Title: Better start script for classpath
Type: rfe Severity: major
Components: Core Versions: Jython 2.5
Status: closed Resolution: wont fix
Dependencies: Superseder:
Assigned To: Nosy List: Sunng, alex.gronholm, fwierzbicki
Priority: Keywords:

Created on 2010-12-30.10:01:55 by Sunng, last changed 2013-02-19.23:41:55 by fwierzbicki.

msg6307 (view) Author: Sunng (Sunng) Date: 2010-12-30.10:01:54
When using jython, we often use python-java inter-operation. It's easy to manage python dependencies since we have virtualenv and pip, both of them work with jython perfectly, follow python's convention. To do things with Java, we can grab dependencies with ant/ivy, which I found is very easy to manage.

But it comes to the most difficult part, append these external jars to classpath. Everytime, we have do type commands like, `jython -Dpython.path=FOO:BAR` unless we do some dirty work on the original start script.

So my suggestion is to define a standard place as a convention to store external jars, for example, something called 'javalib'. Before jython runs, it will append all jars inside to python.path, automatically.

Also, it will be good for jython to ship some skeletons of ant build file and ivy xml. So that, the user can configure the dependencies and retrieve all jar by a simple ant command. This is especially useful for those using virtualenv with jython. 

The standard jython project will be created in such a way: 
1.created a new virtualenv with jython. then you have `bin/` `Lib/` `javalib/` `build.xml` `ivy.xml`
2.use pip to download and install python packages
3.edit ivy.xml, and run ant command to grab jars
4.everything is ready, run jython. python packages and java jars are right in the classpath, everything is so smooth.
msg6376 (view) Author: Alex Grönholm (alex.gronholm) Date: 2011-02-01.01:56:10
Would the JRE's lib/ext dir be sufficient? That is the place where jars are automatically loaded from.
msg7707 (view) Author: Frank Wierzbicki (fwierzbicki) Date: 2013-02-19.23:41:55
Agreed with Alex, lib/ext is the standard place for this. Closing.
Date User Action Args
2013-02-19 23:41:55fwierzbickisetstatus: open -> closed
resolution: wont fix
messages: + msg7707
nosy: + fwierzbicki
versions: + Jython 2.5, - 2.5.2rc
2011-02-01 01:56:10alex.gronholmsetnosy: + alex.gronholm
messages: + msg6376
2010-12-30 10:01:55Sunngcreate