I am working with Ubuntu 16.04 and there I have a project where I need to add the path "usr/local/MATLAB/R2017a/bin/glnxa64" as VM argument or Native Library Location, but I would like to avoid doing it, so I have read that I could do this by adding this line on .bashrc file
export LD_LIBRARY_PATH=/usr/local/MATLAB/R2017a/bin/glnxa64:/usr/local/MATLAB/R2017a/sys/os/glnxa64
Apparently it is working because when I wrote the command "java -XshowSettings:properties"
on the terminal I got this output:
java.library.path = /usr/local/MATLAB/R2017a/bin/glnxa64
/usr/local/MATLAB/R2017a/sys/os/glnxa64
/usr/java/packages/lib/amd64
/usr/lib64
/lib64
/lib
/usr/lib
As you can notice the two firts paths are the ones that I set on the bashrc file.
But WHY when I run this lines on Java:
String path = System.getProperty("java.library.path");
System.out.println(path);
I got this output:
/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
Why are the firts two paths missing ? how can I Do this?