I wrote some JNI hooks to the C ++ library and created some DLL files for my java server project. Let's say the DLL and jar files are in the same folder in the "C: / server" folder
I access these DLL files using:
System.loadLibrary("someDLLFile");
in a class that needs C ++ code.
The problem I am facing is when I run this server on my machine, everything works fine, regardless of where I put the server folder. But when I give this to a colleague for testing, they constantly get:
java.lang.UnsatisfiedLinkError no someDLLFile in java.library.path
I want the dll files to work in the same folder as the jar files, and would prefer that someone not configure their PATH variable.
Why does System.loadLibrary () work on my own computer, regardless of the location of the folder, but not on another computer?
source
share