Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
180 views
in Technique[技术] by (71.8m points)

how to set java -Djava.library.path="homepath.SomeFile.so" in linux environment for Tomcat instance?

How do i set it in the Linux environment?

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
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

You need to set the JVM parameter in [path to tomcat]/bin/catalina.sh, in the variable CATALINA_OPTS or JAVA_OPTS.

The value should be a valid Linux path (or paths) containing your libraries.

You can refer to this question: add jvm options in tomcat


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...