[Bug 347789] [NEW] jython can't find standard libraries
Daanemanz
daan at daanemanz.nl
Tue Mar 24 08:40:43 UTC 2009
Public bug reported:
Binary package hint: jython
Using The Grinder, we came up to a quirk in jython 2.2.1 on Intrepid
32-bit. When using jython scripts from The Grinder, we use standard
jython (2.2.1-1ubuntu3) and java (sun-java6-jre, jdk and bin, version
6-07-3ubuntu2) libraries, but in some cases jython cannot find these
libraries.
jython.jar itself is located in /usr/share/java, whereas its libraries
are located in /usr/share/jython/Lib. I'm sure that the 'standard'
/usr/bin/jython script sets the directories correctly, but when jython
is started directly from its directory by calling 'java -jar
/usr/share/java/jython.jar', and you try to import, let's say 'random',
jython will give you an error:
me at mylaptop:/usr/share/java$ java -jar jython.jar
Jython 2.2.1 on java1.6.0_07
>>> import random
Traceback (innermost last):
File "<console>", line 1, in ?
ImportError: no module named random
We also found a workaround by creating a symlink to
/usr/share/jython/Lib in the /usr/share/java directory. Somehow jython
looks for a 'Lib' directory in its current directory to find its
libraries. We think that either jython.jar should be placed in the
/usr/share/jython directory, or a symlink as described should be added
to the package.
** Affects: jython (Ubuntu)
Importance: Undecided
Status: New
** Tags: jython
** Description changed:
Binary package hint: jython
Using The Grinder, we came up to a quirk in jython 2.2.1 on Intrepid
32-bit. When using jython scripts from The Grinder, we use standard
jython (2.2.1-1ubuntu3) and java (sun-java6-jre, jdk and bin, version
6-07-3ubuntu2) libraries, but in some cases jython cannot find these
libraries.
jython.jar itself is located in /usr/share/java, whereas its libraries
are located in /usr/share/jython/Lib. I'm sure that the 'standard'
/usr/bin/jython script sets the directories correctly, but when jython
is started directly from its directory by calling 'java -jar
/usr/share/java/jython.jar', and you try to import, let's say 'random',
jython will give you an error:
me at mylaptop:/usr/share/java$ java -jar jython.jar
- Jython 2.2.1 on java1.6.0_10
+ Jython 2.2.1 on java1.6.0_07
>>> import random
Traceback (innermost last):
File "<console>", line 1, in ?
ImportError: no module named random
We also found a workaround by creating a symlink to
/usr/share/jython/Lib in the /usr/share/java directory. Somehow jython
looks for a 'Lib' directory in its current directory to find its
libraries. We think that either jython.jar should be placed in the
/usr/share/jython directory, or a symlink as described should be added
to the package.
--
jython can't find standard libraries
https://bugs.launchpad.net/bugs/347789
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
--
ubuntu-bugs mailing list
ubuntu-bugs at lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
More information about the universe-bugs
mailing list