My application loads a native library (idcomm25.dll file). If I start the application from command prompt with "java -jar myapplication.jar" command, or double clicking on myapplication.jar from explorer, all is fine. If I start the application via a .bat (even with 'run as administrator') that contains the same command as above, when the program tries to use the library, I get the error:
Exception in thread ... java.lang.UnsatisfiedLinkError: Unable to load library
'idcomm25': Native library (win32-x86-64/idcomm25.dll) not found in resource
path ([myapplication.jar])
at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:271)
at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:398)
at com.sun.jna.Library$Handler.<init>(Library.java:147)
at com.sun.jna.Native.loadLibrary(Native.java:412)
at com.sun.jna.Native.loadLibrary(Native.java:391)
...
What am I missing?