|
From: <ti...@ca...> - 2001-06-19 07:13:35
|
-> On Mon, 18 Jun 2001 ti...@ca... wrote: -> > Hi all, -> > -> > I have a Jython package that I'd like to distribute in a single file, -> > if possible. I see tantalizing references to "freezing" vs "compiling"; -> > it sounds like I want the former, since I rely fairly heavily on a -> > non-Java file structure (e.g. more than one class/file), but I'm not -> > sure what the options are here. -> -> Current options: -> 1. runnable -> 2. frozen- seemingly likely option for your needs. Indeed, it was. -> and maybe, -> 3. Custom import ...although I use a bit of this too. -> > I'd be happy to explore the possibilities if someone can get me started -> > on the right track, but I'd rather not trail-blaze if there's something -> > already out there. -> -> This isn't really trail-blazing. The jythonc docs are fairly helpful, and -> are located at: -> -> http://jython.sourceforge.net/docs/jythonc.html I suspected that freezing was the way to go, but the XXXs and complete lack of examples on that page were not so helpful -- in particular, it is only through involved contextual reading that I just realized that "freezing" is clearly stated to be a result of '-j file --deep'... [ munch ] -> To freeze A.py use: -> -> jythonc --deep -j myapp.jar A.py -> -> This compiles A.py and B.py and places the compiled classes in myapp.jar. -> This jar plus jython.jar (plus any other jars you use) is all that is -> required to run your app. [ munch ] Exactly what I needed. The only problem -- and one that may not be addressible w/in Java/Jython -- is that Jython happily imported my file 'ds-chooser.py' whereas Java croaked on classes with a '-' in them. This turned out to be the problem that made the first freeze I tried fail on me. So, my apologies for my confusion, and my thanks for the help! Would anyone be interested in a slight modification of the jythonc.bat documentation elucidating some of these points? cheers, --titus |