I\'m running a library via JNI (I didn\'t write it), and internally it calls another DLL. I get an error saying \"Can\'t find dependent libraries\" unless I put the path of
This helped me a lot. Also managed loading a JNI dll built using cygwin:
first:
/* conditioned if OS is windows because also need it to work in Linux env. */
System.loadLibrary("cygwin1");
then:
System.loadLibrary("mylib");
On windows, This requires either setting the java.library.path to match both libraries locations.
If runnning from Eclipse, this setting may be replaced by "Native Libraries Location" in java build path (in JRE libraries settings).
However, still finding this a bit tricky.