|
From: tom a. <klo...@gm...> - 2006-12-09 22:06:48
|
I am having trouble compiling a java file that references a class compiled
with jythonc. The java compiler won't recognize the method compiled from
the .py file. Particulars are as follows:
===========================================
public class W {
V v;
public W() {
v = new V();
v.test();
}
public static void main(String[] args){
W w = new W();
}
}
============================================
import java
class V(W):
def __init__(self):
"""@sig public W()"""
def test(self, num):
"""@sig public void test(int num)"""
print num
===========================================
Kloro@debian:~/jython-2.1/Demo/javaclasses$ jythonc --package pygraph V.py
processing V
Required packages:
java
Creating adapters:
Creating .java files:
V module
Compiling .java to .class...
Compiling with args:
['/home/kloro/java/jdk1.5.0_06/bin/javac', '-classpath', '/home/kloro/jython-2.1/jython.jar::./jpywork::/home/kloro/jython-2.1/Tools/jythonc:/home/kloro/jython-2.1/Demo/javaclasses/.:/home/kloro/jython-2.1/Lib', './jpywork/pygraph/V.java']
0
kloro@debian:~/jython-2.1/Demo/javaclasses$ jikes pygraph/W.java
Found 1 semantic error compiling "pygraph/W.java":
10. v.test(3);
^-----^
*** Semantic Error: No accessible method with signature "test(int)" was found
in type "V".
Thanks,
tom arnall
north spit, ca
Make cyberspace pretty: stamp out curly brackets and semicolons.
|