Message6577
Adding a JAR file to the classpath by appending its location to sys.path does not make the packages contained in the JAR available.
I thought this was related to #1455, which was supposedly fixed, but it doesn't work. In Jython 2.2, if somelib.jar was located in /path/to/somelib.jar and contained the package somepackage, one could do the following:
import sys
sys.path.append("/path/to/somelib.jar")
import somepackage
This will not work in either Jython 2.5.1 or 2.5.2 (somepackage is not available).
However, if the class files are not in a JAR but in a directory, e.g. /path/to/somebin, it will also work with the two new releases:
import sys
sys.path.append("/path/to/somebin")
import somepackage
Works fine.
You can try this with any JAR. So far I haven't found one I could import with 2.5.1/2.5.2.
Because the issue breaks backward compatibility with Jython 2.2 and I am unaware of an equally simple way of dynamically loading JARs, I consider this to be critical. |
|
Date |
User |
Action |
Args |
2011-07-22 15:33:53 | djain | set | recipients:
+ djain |
2011-07-22 15:33:53 | djain | set | messageid: <1311348833.47.0.649001221694.issue1776@psf.upfronthosting.co.za> |
2011-07-22 15:33:53 | djain | link | issue1776 messages |
2011-07-22 15:33:52 | djain | create | |
|