From: Sells, F. <fr...@ad...> - 2001-05-23 19:19:54
|
I hope this is the right place to post this I've been using jython to build applications. Now I want to build an applet. I've started with the demo's but I just can't seem to get it up :) I'm using jython 2.0 and jdk 1.1.8 on W2000 I was using jdk1.3 for applications, but I think I've got everything pointing to 1.1.8 now. I would really appreciate a clue or two, I'm starting to go in an infinite loop. the "aaa.py" file is just the LabelDemo renamed (yes I changed the class name in the file) see below c:\aaa>echo %PATH% echo %PATH% C:\jdk1.1\bin;c:\jython-2.0;mRoot%\System32\Wbem;Z:.;Y:. c:\aaa>echo %CLASSPATH% echo %CLASSPATH% C:\jdk1.1;c:\jython-2.0\jython.jar c:\aaa>jythonc --core --deep --jar aaa.jar aaa.py jythonc --core --deep --jar aaa.jar aaa.py processing aaa processing pawt.__init__ Required packages: java.awt java.applet Creating adapters: java.awt.event.WindowListener used in __init__ Creating .java files: aaa module aaa extends java.applet.Applet __init__ module Compiling .java to .class... Compiling with args: ['/jdk1.1/bin/javac', '-classpath', 'C:\\jython-2.0\\jython.jar;C:\\jdk1.1;c:\\jython-2.0\\jython.jar;.\\jpywork ;;C:\\jython-2.0\\Tools\\jythonc;c:\\aaa\\.;C:\\jython-2.0\\Lib;C:\\jython-2 .0', '.\\jpywork\\aaa.java', '.\\jpywork\\pawt\\__init__.java'] 1 .\jpywork\aaa.java:3: Superclass java.applet.Applet of class aaa not found. public class aaa extends java.applet.Applet implements org.python.core.PyProxy { ^ .\jpywork\aaa.java:7: Superclass java.lang.Object of nested class aaa. _PyInner not found. public static class _PyInner extends PyFunctionTable implements PyRunnable { ^ .\jpywork\pawt\__init__.java:5: Superclass java.lang.Object of class pawt.__init__ not found. public class __init__ extends java.lang.Object { ^ .\jpywork\pawt\__init__.java:9: Superclass java.lang.Object of nested class pawt.__init__. _PyInner not found. public static class _PyInner extends PyFunctionTable implements PyRunnable { ^ 4 errors ERROR DURING JAVA COMPILATION... EXITING c:\aaa> ---------------------------------------------------------aaa.py------------- ---------------------------------------------------------------------- """A rough translation of an example from the Java Tutorial http://java.sun.com/docs/books/tutorial/ This example shows how to use Label """ from java import applet from java.awt import Label, GridLayout class aaa(applet.Applet): def init(self): self.setLayout(GridLayout(0,1)) self.add(Label('Left')) self.add(Label('Center', Label.CENTER)) self.add(Label('Right', Label.RIGHT)) if __name__ == '__main__': import pawt pawt.test(LabelDemo()) |