所以我在编译非常简单的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