Issue1454

classification
Title: Add javalib to the classpath
Type: behaviour Severity: normal
Components: Versions: 2.5.1
Milestone:
process
Status: closed Resolution: wont fix
Dependencies: Superseder:
Assigned To: otmarhumbel Nosy List: fwierzbicki, jpartogi, krink, otmarhumbel, zyasoft
Priority: Keywords:

Created on 2009-09-02.10:08:27 by jpartogi, last changed 2015-04-25.20:08:58 by zyasoft.

Messages
msg5085 (view) Author: Joshua Partogi (jpartogi) Date: 2009-09-02.10:08:26
1. Javalib folder is not available if you are installing using the
Complete mode or the Core mode. By default this library should be
available for users to put jar files. This directory should be created
automatically upon installation.

2. Currently in either jython.bat or jython.sh, javalib is added to the
classpath only if jython-dev.jar is available. javalib should also be
added to the classpath even if there's only jython.jar in jython_home.
msg5087 (view) Author: Oti Humbel (otmarhumbel) Date: 2009-09-02.15:33:59
/dist/javalib is completely internal for working with a local copy of the 
SVN repository. It has nothing to do with an installed jython version.

The -J-classpath option provides a way to specify additional .jar files at 
startup.
msg5090 (view) Author: Joshua Partogi (jpartogi) Date: 2009-09-03.00:18:28
Adding the classpath from command line is a dumb idea. In jruby, every 
jars under the lib/ folders is added to the classpath. Hacking the 
jython.sh to add the jars under Lib/ folders is a nasty hack and it should 
be available by default.
msg5091 (view) Author: Oti Humbel (otmarhumbel) Date: 2009-09-03.05:30:12
OK now i see what you want: have a defined directory where to put .jar 
files, and all of those .jar files are added to the classpath on startup.

Thanks for the feature request!
msg5092 (view) Author: Joshua Partogi (jpartogi) Date: 2009-09-03.05:34:14
Thanks! I'm sorry I didn't make myself clear initially.

regards,
msg7719 (view) Author: Frank Wierzbicki (fwierzbicki) Date: 2013-02-20.03:06:51
I say this is what the lib/ext directory is for in the Java runtime.
msg7928 (view) Author: Kristian Rink (krink) Date: 2013-03-11.14:40:50
Though I understand the point about lib/ext, I wonder whether this actually is the solution to this? Personally, atm I also hacked the jython script to evaluate javalibs/. My installed Java runtime is used for more applications than just Jython, and I for sure want to have different libraries available to different applications. I don't want Jython to see the same jars as, in example, Glassfish does, and quite some apps (Glassfish, Tomcat, ...) provide custom folders for keeping track of jars to be put on the classpath for this very application. So I wonder why, in case of Jython, this shouldn't be a valid idea, too?
msg9960 (view) Author: Jim Baker (zyasoft) Date: 2015-04-25.20:08:58
We have a great solution already: use sys.path. Which works with site-packages. Which means you can include jars in site-packages, and use standard pth support.

This functionality is used by Clamp - see the jar.pth it generates - but it's not unique to Clamp either. You can replicate by doing something like the following in site-packages, just so long as it has a .pth extension:

./jars/clamped-0.1.jar
./jars/fireside-0.1.jar
History
Date User Action Args
2015-04-25 20:08:58zyasoftsetnosy: + zyasoft
messages: + msg9960
2013-03-11 14:40:50krinksetnosy: + krink
messages: + msg7928
2013-02-20 03:06:51fwierzbickisetstatus: open -> closed
resolution: wont fix
messages: + msg7719
nosy: + fwierzbicki
2009-09-03 05:34:14jpartogisetmessages: + msg5092
2009-09-03 05:30:13otmarhumbelsetstatus: closed -> open
assignee: otmarhumbel
resolution: invalid -> (no value)
messages: + msg5091
2009-09-03 00:18:28jpartogisetmessages: + msg5090
2009-09-02 15:34:00otmarhumbelsetstatus: open -> closed
resolution: invalid
messages: + msg5087
nosy: + otmarhumbel
2009-09-02 10:09:01jpartogisetversions: + 2.5.1
2009-09-02 10:08:27jpartogicreate