|
From: Robert W. B. <rb...@di...> - 2001-06-19 22:14:04
|
Reply appended... On Tue, 19 Jun 2001 ti...@ca... wrote: > -> 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. E-x-c-c-cellent. > 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? There was a bit of a buzz concerning improving Jython's documentation a while back that inspired a wiki page at: http://www.jython.org/cgi-bin/moin.cgi/JythonDevelDocs Nobody has really contributed there since it was set up, and I've ran into some deadline troubles of my own that have kept me away from it as well. It would be nice to see your suggestion become an addition there, and possibly enliven the place. Otherwise, you could consider revising the language of http://www.jython.org/docs/jythonc.htm and send proposed changes. On another note... I'm curious about what your deliverable is, so I'm guessing others might be as well. Is it something that should be added to: http://jython.sourceforge.net/users.html -robert |