I'm running apache tomcat on a Linux machine hosted on google cloud, standard machine without anything fancy.
The machine host's back_end Java API business application which requires certain binary .so files to link to when running.
The required libraries are added to $LD_LIBRARRY_PATH
But when i run tomcat, java.library.path does not include this, and i get the error:
31-May-2022 11:20:16.378 INFO [main] jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke The Apache Tomcat Native library which allows using OpenSSL was not found on the java.library.path: [/usr/java/packages/lib:/usr/lib/x86_64-li nux-gnu/jni:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/usr/lib/jni:/lib:/usr/lib]
Im out of ideas, how do i setjava.library.path includes $LD_LIBRARY_PATH when java runs ?
Krgds.
MORE INFO:
running from commandline:
java -XshowSettings:properties
gives:
java.library.path = $LD_LIBRARY_PATH
/opt/ibm/ILOG/CPLEX_Studio129/cplex/bin/x86-64_linux
/opt/ibm/ILOG/CPLEX_Studio129/cplex/lib
/usr/java/packages/lib
/usr/lib/x86_64-linux-gnu/jni
/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu
/usr/lib/jni
/lib
/usr/lib
But when tomcat/catalina, runs it tels:
was not found on the java.library.path: [/usr/java/packages/lib:/usr/lib/x86_64-li
nux-gnu/jni:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/usr/lib/jni:/lib:/usr/lib]