I'm putting together a jar that will let me call commands only available to natives (the jar uses natives rather then the actual program). Now I ran into a problem, whenever I load the DLL. Here is the error:
Exception in thread "main" java.lang.UnsatisfiedLinkError: Unable to load library 'myDLL.dll': The specified module could not be found.
at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:194)
at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:283)
at com.sun.jna.Library$Handler.<init>(Library.java:142)
at com.sun.jna.Native.loadLibrary(Native.java:368)
at com.sun.jna.Native.loadLibrary(Native.java:353)
at src.NativeBridgeJar.<clinit>(NativeBridgeJar.java:6)
at src.Main.main(Main.java:6)
I don't why what the cause of this error would be. I made sure I set the native library path to the folder with the native. Does anyone have an idea?
A) when you call Native.loadLibrary(), you may provide a shorthand name ("myDll"), a filename ("myDll.dll"), or the absolute path of the shared library ("c:/users/me/myDll.dll").
B) If you don't provide an absolute path to the library, you may tell it where to load the DLL by specifying jna.library.path, or making it available on java.library.path (there are other options described in the NativeLibrary javadoc).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With