maasha maasha - 12 days ago 5
Java Question

How include a directory to java.library.path on Linux/Debian?

I would like to add

/usr/lib/oracle/11.2/client64/lib
to
java.library.path
so it shows when running
java -XshowSettings:properties
- how can this be done?

I am running Linux/Debian

JJF JJF
Answer

On Linux the default for java.library.path is the environment variable LD_LIBRARY_PATH so you could do

LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/oracle/11.2/client64/lib
export LD_LIBRARY_PATH

Then verify in your Java program with -XshowSettings:properties or

System.out.println(System.getProperty("java.library.path");
Comments