本文介绍了如何设置java -Djava.library.path ="\ home \ path.SomeFile.so"在Linux环境中的Tomcat实例?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在Linux环境中进行设置?
How do i set it in the Linux environment?
我一直收到以下错误.
我假设它是因为我必须在运行配置中的参数中设置的eclipse中设置-Djava path .
.
I keep getting the below error.
I am assuming its because i have to set the -Djava path .
in eclipse i set in the arguments in the run configuration.
java.lang.UnsatisfiedLinkError: /opt/apache-tomcat-8.0.33/temp/librocksdbjni1678787310187961141..so: libgflags.so.2: cannot open shared object file: No such file or directory
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1824)
at java.lang.Runtime.load0(Runtime.java:809)
at java.lang.System.load(System.java:1086)
at org.rocksdb.NativeLibraryLoader.loadLibraryFromJar(NativeLi
推荐答案
您需要在[tomcat的路径]/bin/catalina.sh中的变量CATALINA_OPTS或JAVA_OPTS中设置JVM参数.
You need to set the JVM parameter in [path to tomcat]/bin/catalina.sh, in the variable CATALINA_OPTS or JAVA_OPTS.
该值应该是包含您的库的有效Linux路径.
The value should be a valid Linux path (or paths) containing your libraries.
您可以参考以下问题:在tomcat中添加jvm选项
You can refer to this question:add jvm options in tomcat
这篇关于如何设置java -Djava.library.path ="\ home \ path.SomeFile.so"在Linux环境中的Tomcat实例?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!