From: David Ripton <dripton@ri...> - 2003-01-24 18:41:29
Is anyone out there deploying Jython programs via Java Web Start?
We have an existing Java application, mainly distributed via JWS, that I'm
considering enhancing with Python code. The problem is seamlessly getting
the core Jython library code to the users' machines.
Having the users install it manually is not a good option -- too hard for
I could reinvent part of JWS by writing code to look for Jython in the
classpath, and download it if it's not there, but the JWS classloader
issues might get ugly.
Just including Jython in our application's jar file would be easy for me,
but would increase download times for users. (jython.jar is about 700 kB;
our application is about 1.2 MB.) Obviously any solution is going to make
the users download Jython once, but users download new versions of our
program frequently, and I hate hitting them with that extra 700 kB every time.
http://www.jython.org/applets claims the Jython library is only 200 kB. This page
is old, but I presume that the full jython.jar was never that small, and
someone trimmed out everything not needed by a typical applet, to create a
minimal runtime jar that only runs Jython .class files. Looks like zxJDBC,
Oro (if you don't need regular expressions), the compiler and parser (if
you don't need eval), the interactive prompt, and anything in the modules
directory that you don't need are fair game for chopping. Anyone already
doing this with Jython 2.1? If so, can you share your minimal files list?
David Ripton dripton@...
From: Eric Jain <Eric.J<ain@is...> - 2003-01-25 14:47:07
> Is anyone out there deploying Jython programs via Java Web Start?
> Just including Jython in our application's jar file would be easy
If you keep jython.jar in a separate file, web start should be clever
enough to not download it again just because your main application jar
changed. Optionally, if you want to avoid having jython.jar transferred
unless it is actually used, you can use web start's lazy loading feature.
<package name="org.jython.*" part="jython" recursive="true"/>
<jar href="jython.jar" part="jython" download="lazy"/>
Note: There are some other packages in jython.jar, you'd have to declare
them as well. Also, any Java classes you use within Jython, but not anywhere
else need to be registered explicitly, classloading issue...
from my.test import A, B, C