Jpype on RHEL v3

benchline benchline at gmail.com
Fri Apr 7 13:33:11 EDT 2006


I found the problem.  So if anyone else has it here is the fix.

In the documentation distributed with JPype 0.5.1 in the examples/linux
directory, there is a file that describes a problem with loading the
jvm on linux.  So one needs to modify the LD_LIBRARY_PATH environment
variable to fix it.

I did that after changing one line in
/usr/lib/python2.4/site-packages/jpype/_linux.py line 37 to

return "/etc/alternatives/java_sdk/jre/lib/i386/client/libjvm.so"

so that jpype.getDefaultJVMPath() would return the correct libjvm.so
path for my install.

Then I did

export
LD_LIBRARY_PATH=/etc/alternatives/java_sdk/jre/lib/i386:/etc/alternatives/java_sdk/jre/lib/i386/client

after doing that the sun 1.4.2 jre loaded just fine with:
[root at servername root]# python2.4
Python 2.4.2 (#1, Dec  1 2005, 05:44:04)
[GCC 3.2.3 20030502 (Red Hat Linux 3.2.3-53)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import jpype
>>> jpype.startJVM(jpype.getDefaultJVMPath())
>>>




More information about the Python-list mailing list