|
From: DITTGEN P. <pie...@cr...> - 2001-04-04 10:02:57
|
>
> Now this means that your app will have to ship some python
> files in the JAR.
It annoyed me quite much and I looked further in the code (in
org.python.modules.os).
Before the line that causes me trouble, i.e. this:
public static String __file__ =
Py.getSystemState().prefix.toString() + "/Lib/javaos.py";
there is a comment saying:
// An ugly hack, but it keeps the site.py from CPython2.0 happy
So, apparently, it's just a hack, that's not used at runtime...
BUT, this hack requires the 'python.home' system property to be set..
So, i just tried to declare it and it works!
my example runs now with:
java -Dpython.home= -jar dir.jar
(dir.jar was created using --all option to include all jython libs useful
for my app)
It won't be very difficult to set this empty property at deployment time,
in any case easier than installing a jython distrib on the host machine.
Thanks for the help
Pierre
|