I am trying to build a SWING application in which I use a dll to get data from a device connected via USB. I used JNA to interface dll into JAVA and I was successful in doing so when I run the application from Eclipse. But the issue is when i package this into an executable JAR and I try to run in the same machine I am getting
UnsatisfiedLinkError: Unable to load library 'test.dll': The specified module could not be found
at com.sun.jna.NativeLibrary.loadLibrary NativeLibrary.java :169
at com.sun.jna.NativeLibrary.getInstance NativeLibrary.java :242
I was loading the dll using
driverDLL INSTANCE = (driverDLL) Native.loadLibrary((Platform.isWindows() ? "test" : "simpleDLLLinuxPort"), driverDLL.class);
int start();
I did not find any issue while running an application in eclipse but im always running into exception when i run it as executable jar in the same machine. Please help