From: <no...@so...> - 2001-05-17 23:45:53
|
Bugs item #425015, was updated on 2001-05-17 16:45 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=112867&aid=425015&group_id=12867 Category: Jythonc compiler Group: None Status: Open Resolution: None Priority: 5 Submitted By: Tessa Lau (tlau) Assigned to: Nobody/Anonymous (nobody) Summary: Jythonc duplicate entry error with --all Initial Comment: I'm compiling a test program that uses eval() to dynamically look up a class method. I'm using Jython 2.0 on Linux with Sun JDK 1.3.0_01. Here's the code: <pre> class Tlau(JApplet): def init(self): b = JButton('press me', actionPerformed=self.foo) self.contentPane.add(b) def foo(self, event): print 'Foo!' barmethod = eval('self.bar') barmethod(event) def bar(self, event): print 'Bar!' </pre> If I then compile this with "jythonc --core --deep --jar tlau.jar Tlau.py", and run the resulting jar file with "java -jar tlau.jar", I get the error: java.lang.NoClassDefFoundError: org/python/core/parser at org.python.core.Py.compile(Py.java:1422) at org.python.core.__builtin__.compile(__builtin__.java:203) at org.python.core.__builtin__.eval(__builtin__.java:252) at org.python.core.__builtin__.eval(__builtin__.java:266) at java.lang.reflect.Method.invoke(Native Method) (etc.) So I believe that to include the parser class I need to use the --all flag to jythonc. I try the same command, adding --all, and jythonc bombs with this error: Tracking java dependencies: Traceback (innermost last): File "/scratch/tlau/jython-2.0/Tools/jythonc/jythonc.py", line 5, in ? File "/scratch/tlau/jython-2.0/Tools/jythonc/main.py", line 301, in main File "/scratch/tlau/jython-2.0/Tools/jythonc/main.py", line 294, in writeResults File "/scratch/tlau/jython-2.0/Tools/jythonc/jar.py", line 98, in dump File "/scratch/tlau/jython-2.0/Tools/jythonc/jar.py", line 92, in dumpFiles File "/scratch/tlau/jython-2.0/Tools/jythonc/jar.py", line 111, in addPackage java.util.zip.ZipException: duplicate entry: org/python/core/StderrWrapper.class ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=112867&aid=425015&group_id=12867 |