java.lang.UnsatisfiedLinkError: Can't load library from JNI code

来源:互联网 发布:软件使用规章制度 编辑:程序博客网 时间:2024/04/29 14:06

原文:http://www.velocityreviews.com/forums/t390018-java-lang-unsatisfiedlinkerror-cant-load-library-from-jni-code.html


For System.loadLibrary() use the short name only, i.e. no path prefix
or dll extension, and make sure the file is in java.library.path or
your search PATH. For example:

System.loadLibrary("sampleDLL2");


For System.load(), specify the full path and filename. For example:

System.load("C:/sampleDLL2.dll");


System.loadLibrary() is the preferred mechanism.


推荐使用System.loadLibrary() 方式加载底层库。

原创粉丝点击