-Djava.library.path not work on linux?
843798Sep 14 2006 — edited Sep 20 2006I am invoking the java vm with -Djava.library.path=_MY_LIBRARY_PATH_ and this does not seem to be reflected by java during execution. I see this behaviour on J2SE 5.0.x and J2SE 6.0 beta2.
I am trying to set LD_LIBRARY_PATH so that my app can load shared objects that are in the Java application's directory. Essentially, I have two shared objects, libA.so and libB.so. libB.so is dependent on libA.so, but libA.so is NOT dependent on libB.so (i.e.: there is no circular dependency). I can:
System.loadLibrary( "A" ); // Works
System.loadLibrary( "B" ); // Throws UnsatisfiedLinkError because B can't find A on the LD_LIBRARY_PATH.
Are there any work-arounds to this problem?
Also, this is a WebStart application, so an sh script to set the LD_LIBRARY_PATH prior to launch doesn't seem feasible.
Any ideas or work-arounds for this bug?
Thanks much.
Dustin