-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
java.lang.UnsatisfiedLinkError: Unable to load library ----> JNA on Windows #725
Comments
Please check that you have the Visual C++ Runtime 2010 64bit installed. |
Are you setting the property "jna.library.path" to the location of your On Mon, Nov 14, 2016 at 1:40 PM, Matthias Bläsing notifications@github.com
|
I'll asume the replies cleared the situation - feel free to reopen. |
thanks,this perplex very day。final now ok。 |
I am trying to load the .dll file I have built from my C/C++ project on Windows 7. I have created a small piece of code in Java to load the library with JNA, but it gives me the following error.
Exception in thread "main" java.lang.UnsatisfiedLinkError: Unable to load library 'C:\Users\Local\Temp\libMCS.dll': Native library (win32-x86-64/C:\Users\Local\Temp\libMCS.dll) not found in resource path ([file:/C:/Users/Agolbamaki/workspace/test/bin/, file:/C:/Users/workspace/test/jna-4.2.2.jar])
at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:277)
at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:403)
at com.sun.jna.Library$Handler.(Library.java:147)
at com.sun.jna.Native.loadLibrary(Native.java:502)
at com.sun.jna.Native.loadLibrary(Native.java:481)
at Loader.(Loader.java:43)
at HelloWorld.main(HelloWorld.java:61)
I guess it cannot find the .dll file eventhough it is copied in the current directory (almost in all the possible directories). I also tried to copy the .dll in a TEMP directory and load it by an absolute path.
It automatically adds a prefix to the library path (win32-x86-64/C:\PATH\Temp\libMCS.dll).
Thank you for your help
The text was updated successfully, but these errors were encountered: