jpype "setup.py" fails under Ubuntu 11.04
Status: Beta
Brought to you by:
devilwolf
After downloading the 0.5.4.1 zip to an Ubuntu 11.04 system.
python setup.py build
running build
running build_py
running build_ext
building '_jpype' extension
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
In file included from src/native/common/jp_invocationhandler.cpp:1:0:
src/native/common/include/jpype.h:45:17: fatal error: jni.h: No such file or directory
compilation terminated.
error: command 'gcc' failed with exit status 1
However, the Synaptic manager installs correctly, I think.
Oz
4dtext.com
Problem is, that setup.py contains a fixed reference to a java-version in the following line:
self.javaHome = '/usr/lib/jvm/java-1.5.0-sun-1.5.0.08' # Ubuntu linux
Solution: This should be changed to:
self.javaHome = '/usr/lib/jvm/java'
With this change, gcc compiles JPype.