From: Alexander Stoddard <astoddar@ma...> - 2007-01-05 19:11:27
I have read with great interest and benefit the articles on using
jython from java without using jythonc.
I also note that there seems to be a general desire to get away from
needing jythonc in as many places as possible.
One use I have made of jythonc is to distribute applications packaged
as a single jar file.
It occurs to me that it may be possible to create a java wrapper to
implement a "jython application launcher" somewhat analogous to the
"jython object factory" described in October's jython monthly (http://
combine this with One-Jar (http://one-jar.sourceforge.net/). The
jython source files would be resources in the jar.
If this idea worked it also has the potential to allow a splash
screen on start up under SE6.
From what I describe does making an application jar without jythonc
I am interested in exploring the implementation but I suspect I will
get out of my depth and I would appreciate criticism of my code. If I
can get the bare-bones of something together would it be appropriate
to post an "exploratory" article to jython monthly to actively
solicit others contributions/criticisms with the express intent of
evolving the article over time?
Any thoughts or comments much appreciated,
It sounds like you've got a great plan. I think it would be extremely useful for Jython application jar files to be made without jythonc. Please feel free to author an article, or even a step-by-step tutorial describing the processes you explore. If you would like to promote this topic for further discussion that is great as well.
Thanks for the interest in contributing to Jython Monthly, and I look forward to reading about your implementation.
From: Kent Johnson <kent37@td...> - 2007-01-05 19:22:40
Alexander Stoddard wrote:
> From what I describe does making an application jar without jythonc
> sound feasible?
I routinely distribute Jython applications as multiple jars, usually
jython.jar, a jar with Java .class files, a jar with .py files and any
additional library jars needed. I use a simple batch file launcher,
there is no magic to this at all. This would probably work just fine
with all the files in a single jar.
Here is a typical launch line:
java -Xmx128m -DDEBUG "-Dpython.home=lib/" -classpath
-Dpython.path="lib/e3po.jar" org.python.util.jython -jar lib/e3po.jar
In this case e3po.jar is the jar with the .py files, everything else is
Java and other stuff I want on the classpath like .properties files.
e3po.jar has __run__.py at the root level which is the entry point for