getDefaultJVMPath doesn't gracefully handle missing JAVA_HOM
Status: Beta
Brought to you by:
devilwolf
The traceback is below.
I think this function should return None if it can't get the default path. It's then up to the caller to deal with error handling.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.5/site-packages/jpype/_core.py", line 96, in getDefaultJVMPath
return _linux.getDefaultJVMPath()
File "/usr/lib/python2.5/site-packages/jpype/_linux.py", line 36, in getDefaultJVMPath
jvm = _getJVMFromJavaHome()
File "/usr/lib/python2.5/site-packages/jpype/_linux.py", line 55, in _getJVMFromJavaHome
if os.path.exists(java_home+"/bin/javac") :
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
Sorry -- I just noticed this is a dup of 2799530