问题
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
回答1:
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
来源:https://stackoverflow.com/questions/39929347/how-to-set-java-djava-library-path-home-path-somefile-so-in-linux-environmen