jpype.getDefaultJVMPath() fails
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-jpype (Debian) |
Fix Released
|
Unknown
|
|||
python-jpype (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Using Ubuntu 12.04 and having the default installation of Python 2.7.3, the call of 'jpype.
~$ python
Python 2.7.3 (default, Apr 20 2012, 22:39:59)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import jpype
>>> jpype.getDefaul
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/
return _linux.
File "/usr/lib/
jvm = _getJVMFromJava
File "/usr/lib/
if os.path.
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
>>>
Changed in python-jpype (Debian): | |
status: | Unknown → Confirmed |
Changed in python-jpype (Debian): | |
status: | Confirmed → Fix Released |
I've opened a companion bug with Debian as the problem exists there too. ( http:// bugs.debian. org/cgi- bin/bugreport. cgi?bug= 683048 )
As a workaround you can set the JAVA_HOME enviroment variable. Assuming that the JVM was installed in /usr/lib/ jvm/java- 7-openjdk- amd64/ you run python like this:
JAVA_HOME= /usr/lib/ jvm/java- 7-openjdk- amd64 python my_script.py
and jpype will work just fine.