JARs + Jython classes

Titus Brown t at chabry.caltech.edu
Tue Jul 2 13:21:30 EDT 2002


In article <afsi31$hp7$1 at reader-00.news.insnet.cw.net>,
Paul Brown <pbrown74 at hotmail.com> wrote:
>
>does anyone know the syntax for loading a jython class from a JAR, or even
>if this is POSSIBLE?

[ munch ]

Hi, Paul,

I have managed to distribute my Jython app, FamilyRelations, in JAR format.
It took me a while to figure it all out ;), so I'm not sure I remember all
the steps, but with recent versions of Jython you can just compile your
Jython files into a jar with the appropriate flags to jythonc:

        $(JYTHONC) --all -j package/FamilyRelations.jar start.py

There are various tricky rules for figuring out what JAR dependencies are
necessary when -- Jython doesn't always have simple rules for what interfaces
are compiled in or looked for -- so if you rely on lots of outside libraries,
you may have to fiddle.

Let me know if I can be of any help.  You can see all my source under the
ctb_devel branch of FamilyRelations/ at the FamilyJewels project on
SourceForge; the Makefile is set up to make the .jar version from the .py
files.

cheers,
--titus



More information about the Python-list mailing list