I'm trying to package a jython app that uses swt into a single jar file.
I've followed the instructions as to create a jythonlib.jar here:
I made a copy of this "MyApp.jar", put all my scripts into the Lib dir
and created a __run__.py file in the root of the jar to launch the main
application. So far so good, but the application fails when my app tries
to import org.eclipse.swt
I copied everything except the meta-inf dir from swt.jar into MyApp.jar
so now there's a bunch of .so libraries and a org/eclipse directory
along side org/python, but the problem remains.
After reading through the archives and trying various launch parameters
setting --classpath and -Dpython.home I've found that the import fails
when I run:
java -Dpython.home=MyApp.jar -classpath MyApp.jar org.python.util.jython
but works when I run
java -Dpython.home=MyApp.jar -classpath /usr/share/java/jython.jar
(however in both cases importing from javax.sound.sampled fails, but
that's another story)
Can anyone shed some light on what's happening here?
(Jython 2.2.1 on java1.6.0_06 - Linux)