#70 Can't find dependent libraries on Windows

Files (8)

I'm trying to build a one-jar with a jni interface to a native library.
(My build process packages both using maven-nar-plugin and maven-onejar-plugin, but that should be irrelevant here.)
One-Jar unpacks and System.load's the JNI library apparently just fine, but the JNI dll depends on a native dll (which is also included in the one-jar).
One-Jar also apparently unpacks the native library as `basename ${native_dll} .dll`-${timestamp}.dll.
The load then fails with an "UnsatisfiedLinkError: <JNI dll>: Can't find dependent libraries.".
My guess is that's due to the fact that Windows' loader is looking for the native library under its original name (without timestamp). Microsoft calls this the "module name".
Any Ideas how to fix this? Would it be feasible to, instead of extracting the binlibs with a timestamp in the filename, extracting them into a timestamped directory under the original names?


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks