Search code examples
javajava-native-interfacejna

JNA UnsatisfiedLinkError exception


I am trying to deploy my application that invokes native calls using JNA library, but I get the following exception. Exception in thread "main" java.lang.UnsatisfiedLinkError: Unable to load library 'myCustomDLL': Native library (win32-x86-64/myCustomDLL.dll) not found in resource path ([myproject/target/classes/, ...some jars...])

What do I need to do in order to invoke the function correctly?

Any help much appreciated


Solution

  • Actually I found the answer to this. Basically, I needed to install Microsoft Visual C++ Redistributable package to install all the necessary DLLs needed for JNA to work. Thanks for other responses to this question.