17 Mar 17:59
How to create self-contained jar including App & Jython class files?
Jan Wedel <Jan.Wedel <at> ettex.de>
2010-03-17 16:59:24 GMT
2010-03-17 16:59:24 GMT
Hi,
The general question is: How can I create a self-contained jar file with
the jython application and jython libs?
Here is some background:
After a LOT of work and the very appreciated help of Charlie Groves I
managed to create a class file from a python script that uses static
proxies (from the customizable-proxies branch). This class file
implements a j2me midlet interface and will be loaded by the KVM or a
WTK emulator. The application HAS to be in a self-contained jar
including ALL necessary classes because dynamic ClassLoading is not
supported.
The problem is, that if I run the created midlet within the emulator, I
get the following error (the bit of german says "No valid Win32
application":
java.io.IOException: Cannot run program
"C:\Programme\Java\jre6\bin\java": Creat
eProcess error=193, %1 ist keine zulõssige Win32-Anwendung
at java.lang.ProcessBuilder.start(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at com.sun.kvem.environment.JVM.run(Unknown Source)
at
com.sun.kvem.environment.EmulatorInvoker.runEmulatorOtherVM(Unknown S
ource)
at com.sun.kvem.environment.EmulatorInvoker.runEmulator(Unknown
Source)
at
com.sun.kvem.environment.ProfileEnvironment$KVMThread.runEmulator(Unk
nown Source)
at
com.sun.kvem.environment.ProfileEnvironment$KVMThread.run(Unknown Sou
rce)
Caused by: java.io.IOException: CreateProcess error=193, %1 ist keine
zulõssige
Win32-Anwendung
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
... 8 more
This has to be related to jython because I get a similar error when I
run the normal (not the configurable-proxies branch) Jython.bat which is
in the windows PATH an then type "exit()":
C:\>jython.bat
Jython 2.5.1 (Release_2_5_1:6813, Sep 26 2009, 13:47:54)
[Java HotSpot(TM) Client VM (Sun Microsystems Inc.)] on java1.6.0_17
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()
java.io.IOException: Cannot run program
"C:\Programme\Java\jre6/bin/java": Creat
eProcess error=193, %1 ist keine zulõssige Win32-Anwendung
at java.lang.ProcessBuilder.start(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at com.sun.jna.Native$DeleteNativeLibrary.run(Native.java:761)
Caused by: java.io.IOException: CreateProcess error=193, %1 ist keine
zulõssige
Win32-Anwendung
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
... 4 more
I would be REALLY helpful if someone knows this error or has an idea hot
to solve it!
Thanks a lot,
Jan
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
RSS Feed