From: Achim G. <Ach...@un...> - 2002-04-19 19:33:34
|
I am trying to compile some python code into an applet. I am doing this with jdk2-1.4 and jython-2.1 . This is the Python code: # two java packages import GatoAlgorithmEngine import GatoGUI class GatoPythonAlgorithmEngine(GatoAlgorithmEngine.GatoAlgorithmEngine): def __init__(self, GUI): "@sig public GatoPythonAlgorithmEngine(GatoGUI.GatoGUI GUI)" GatoAlgorithmEngine.GatoAlgorithmEngine.__init__(self, GUI) def run(self): "@sig public void run()" print "Hello" Here are the messages: [achim@localhost java]$ jythonc -p GatoPythonAlgorithmEngine PythonCode/GatoPythonAlgorithmEngine.py processing GatoPythonAlgorithmEngine Required packages: GatoAlgorithmEngine GatoGUI Creating adapters: Creating .java files: GatoPythonAlgorithmEngine module GatoPythonAlgorithmEngine extends GatoAlgorithmEngine.GatoAlgorithmEngine Compiling .java to .class... Compiling with args: ['/opt/j2sdk1.4.0/bin/javac', '-classpath', '/opt/jython-2.1/jython.jar::./jpywork:PythonCode:/opt/jython-2.1/Tools/jythonc:/home/achim/java/.:/opt/jython-2.1/Lib', './jpywork/GatoPythonAlgorithmEngine/GatoPythonAlgorithmEngine.java'] 1 ERROR DURING JAVA COMPILATION... EXITING To get the java errors, I repeated the javac command: [achim@localhost java]$ /opt/j2sdk1.4.0/bin/javac -classpath /opt/jython-2.1/jython.jar::./jpywork:PythonCode:/opt/jython-2.1/Tools/jythonc:/home/achim/java/.:/opt/jython-2.1/Lib ./jpywork/GatoPythonAlgorithmEngine/GatoPythonAlgorithmEngine.java ./jpywork/GatoPythonAlgorithmEngine/GatoPythonAlgorithmEngine.java:90: cannot resolve symbol symbol : class GatoPythonAlgorithmEngine location: class GatoPythonAlgorithmEngine.GatoPythonAlgorithmEngine Py.runMain(GatoPythonAlgorithmEngine.GatoPythonAlgorithmEngine._PyInner.class, newargs, GatoPythonAlgorithmEngine.jpy$packages, GatoPythonAlgorithmEngine.jpy$mainProperties, null, new String[] {"GatoPythonAlgorithmEngine"}); ^ ./jpywork/GatoPythonAlgorithmEngine/GatoPythonAlgorithmEngine.java:112: cannot resolve symbol symbol : constructor GatoAlgorithmEngine () location: class GatoAlgorithmEngine.GatoAlgorithmEngine super(); ^ Note: ./jpywork/GatoPythonAlgorithmEngine/GatoPythonAlgorithmEngine.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. 2 errors Is the first error dependent on java's version? The code produced by jythonc is appended. javac can't find the nested class. I don't know why. The second error is caused by the default constructor call for the base class. It doesn't exist. I thought, I could avoid calling it, but I couldn't. Any hints? The deprecated message comes from: ./jpywork/GatoPythonAlgorithmEngine/GatoPythonAlgorithmEngine.java:98: warning: jfindattr(org.python.core.PyProxy,java.lang.String) in org.python.core.Py has been deprecated PyObject inst = Py.jfindattr(this, "run"); |