From: Frode R. <fro...@er...> - 2001-05-21 19:31:00
|
I have used Jython for a while, but I haven't use Jythonc before. So I think I have miss something, but are not able to se what. I have this simple python file named test.py: import java.lang print 'java.lang:',dir(java.lang) If I compile it with Jythonc I don't get expected result c:\Document\Test>jythonc --jar test.jar -c test.py : c:\Document\Test>java -jar test.jar test java -jar test.jar test java.lang: ['__name__'] But if I use the interpreter I get the expected result. c:\Document\Test>jython test.py jython test.py java.lang: ['AbstractMethodError', 'ArithmeticException', 'ArrayIndexOutOfBoundsException', 'ArrayStoreException', 'Boolean', 'Byte', 'Character', 'Class', 'ClassCastException', 'ClassCircularityError', 'ClassFormatError', 'ClassLoader', 'ClassNotFoundException', 'CloneNotSupportedException', 'Cloneable', 'Comparable', 'Compiler', 'Double', 'Error', 'Exception', 'ExceptionInInitializerError', 'Float', 'IllegalAccessError', 'IllegalAccessException', 'IllegalArgumentException', 'IllegalMonitorStateException', 'IllegalStateException', 'IllegalThreadStateException', 'IncompatibleClassChangeError', 'IndexOutOfBoundsException', 'InheritableThreadLocal', 'InstantiationError', 'InstantiationException', 'Integer', 'InternalError', 'InterruptedException', 'LinkageError', 'Long', 'Math', 'NegativeArraySizeException', 'NoClassDefFoundError', 'NoSuchFieldError', 'NoSuchFieldException', 'NoSuchMethodError', 'NoSuchMethodException', 'NullPointerException', 'Number', 'NumberFormatException', 'Object', 'OutOfMemoryError', 'Package', 'Process', 'Runnable', 'Runtime', 'RuntimeException', 'RuntimePermission', 'SecurityException', 'SecurityManager', 'Short', 'StackOverflowError', 'StrictMath', 'String', 'StringBuffer', 'StringIndexOutOfBoundsException', 'System', 'Thread', 'ThreadDeath', 'ThreadGroup', 'ThreadLocal', 'Throwable', 'UnknownError', 'UnsatisfiedLinkError', 'UnsupportedClassVersionError', 'UnsupportedOperationException', 'VerifyError', 'VirtualMachineError', 'Void', '__name__', 'ref', 'reflect'] c:\Document\Test> I am running on Windows 2000 with Sun's JDK 1.3.0. Have I miss some thing? I wrote this test file because I have develop a application and used the interpreter in the debugging phase. Then I want to compile it before I send it to external test. But when I compile it with Jythonc and try to run it complain about a class in a java library don't exist. -- /Frode Reinsnes |