所以我在編譯非常簡單的python腳本時遇到了問題,使用JPype。JPype將無法正確編譯
我的代碼是這樣:
from jpype import *
startJVM(getDefaultJVMPath(), "-ea")
java.lang.System.out.println("hello world")
shutdownJVM()
,當我運行它,我收到一個錯誤說:
Traceback (most recent call last): File "test.py", line 2, in
<module>
startJVM(getDefaultJVMPath(), "-ea") File "/usr/lib/pymodules/python2.7/jpype/_core.py", line 44, in startJVM
_jpype.startup(jvm, tuple(args), True) RuntimeError: Unable to load DLL [/usr/java/jre1.5.0_05/lib/i386/client/libjvm.so], error =
/usr/java/jre1.5.0_05/lib/i386/client/libjvm.so: cannot open shared
object file: No such file or directory at
src/native/common/include/jp_platform_linux.h:45
我堅持,我真的需要幫助。謝謝!
錯誤消息是「沒有這樣的文件或目錄」。你能確認文件「/usr/java/jre1.5.0_05/lib/i386/client/libjvm.so」的存在嗎? – 2013-02-22 17:23:21