I have been teaching myself Jython, and try as I might I cannot compile a script as a double-clickable .jar.
I have made a directory 'C:\Folder'. In it t开发者_开发技巧here is:
- a copy of the standalone jython.jar,
- a copy of the Lib folder from the Jython directory,
- file.py, a Jython script that draws a Swing frame with a label, and
- a copy of the 7-Zip command line tool (7za) for zipping.
I have looked here, here, here, and a few other places, and the furthest I've gotten is a .jar that runs with:
java -jar jython.jar -jar jython.jar arg1 arg2
Which I get by renaming 'file.py' to '__run__.py' and zipping it and 'Lib' into 'jython.jar'.
I would, however, love to be able to skip the command line all together. So if anyone would walk me through the commands (I'm using Windows 7) to compile those into a double-clickable jar (let me know what else I may need, too) it would be greatly appreciated.
If you have a folder with:
- a copy of the standalone jython.jar,
- a copy of the Lib folder from the Jython directory,
- file.py, a Jython script ..
you can use launch4j to build an .exe on windows
have a look at the docs on launch4j
精彩评论