Addressing UnsatisfiedLinkError: Can't Find Dependent Libraries in JNI Projects
When developing Java Native Interface (JNI) projects, you may encounter the error: "java.lang.UnsatisfiedLinkError: C:...path...mylib.dll: Can't find dependent libraries." This error indicates that the Java Virtual Machine (JVM) cannot locate the shared libraries (DLLs) required by your JNI library.
Addressing the Problem
To resolve the issue, consider the following solutions:
In Visual Studio 2010 on macOS, the target platform should be set to Windows, as you are testing on Windows XP. If development is done on Windows, set the target platform accordingly.
Additional Tips
For further reference, consult "The JNI Book" or the Oracle HTML version of the JNI Specification. You can also use the command "java -XshowSettings:properties -version" to identify the shared library search path.
The above is the detailed content of Why Can't My JNI Project Find Dependent Libraries?. For more information, please follow other related articles on the PHP Chinese website!