Jpype调用java 故障

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/lovingprince/article/details/7178613

jpype服务器上调用java,老发现如下错误。

Traceback (most recent call last):
  File "visit_cache.py", line 23, in ?
    jpype.startJVM(jvmpath,jvmArg)
  File "/usr/lib64/python2.4/site-packages/jpype/_core.py", line 44, in startJVM
    _jpype.startup(jvm, tuple(args), True)
RuntimeError: Unable to load DLL [/opt/java/jre/lib/amd64/server/libjvm.so], error = libimf.so: cannot open shared object file: No such file or directory at src/native/common/include/jp_platform_linux.h:45
这个错误太扯淡,说是libjvm没找到,我看了下,路径下的确有这个玩意。加上

export LD_LIBRARY_PATH=/opt/java/jre/lib/amd64/server

解决这个问题。




展开阅读全文

没有更多推荐了,返回首页