LD_LIBRARY_PATH vs jna.library.path

614 views
Skip to first unread message

Damien Gallagher

unread,
Oct 9, 2017, 9:50:15 AM10/9/17
to Java Native Access
Hi

I was just wondering what the difference is between LD_LIBRARY_PATH AND jna.library.path

I am trying to deploy my code onto tomcat on ubuntu but I keep get Unsatisfied Link Errors

I changed tomcat to run as the ubuntu user and added the export LD_LIBRARY_PATH to the .profile file
Also I set the jna.library.path system variable but I am not having any joy

Any help here would be appreciated

Thank you
Damien

Timothy Wall

unread,
Oct 9, 2017, 10:49:10 AM10/9/17
to jna-...@googlegroups.com
LD_LIBRARY_PATH affects the system loader's search, which means _all_ libraries requested to be loaded, including dependencies.  jna.library.path affects only the library explicitly loaded by JNA, and has no effect on loading dependencies.

As a side note, you should have a dedicated tomcat user if you're at all concerned about security.

Run with -Djna.debug_load=true to see the paths that JNA tries.

--
You received this message because you are subscribed to the Google Groups "Java Native Access" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jna-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Damien Gallagher

unread,
Oct 9, 2017, 10:54:59 AM10/9/17
to jna-...@googlegroups.com
Thanks Timothy
That is a good suggestion - I have the separate user for tomcat and now I understand the difference in the different variables

--
You received this message because you are subscribed to a topic in the Google Groups "Java Native Access" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jna-users/vPy560n1gU0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jna-users+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages