当我尝试运行我的程序时,它会出现以下错误
When i am trying to run my program it is giving the following error
Exception in thread "main" java.lang.UnsatisfiedLinkError: no jacob-1.14.3-x86 in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682) at java.lang.Runtime.loadLibrary0(Runtime.java:823) at java.lang.System.loadLibrary(System.java:1030) at com.jacob.LibraryLoader.loadJacobLibrary(LibraryLoader.java:184) at com.jacob.JacobObject.<clinit>(JacobObject.java:108) at javaSMSTest.main(javaSMSTest.java:18)请帮助
推荐答案来自Javadoc:
如果Java虚拟机无法找到声明为native的方法的相应本机语言定义,则抛出该函数。
Thrown if the Java Virtual Machine cannot find an appropriate native-language definition of a method declared native.
这是与JNI相关的错误。 loadJacobLibrary正在尝试加载名为jacob-1.14.3-x86的本机库,并且在java.library.path定义的路径上找不到它。启动JVM时,应将此路径定义为系统属性。例如。
It is an error related to JNI. loadJacobLibrary is trying to load the native library called jacob-1.14.3-x86 and it is not found on the path defined by java.library.path. This path should be defined as a system property when you start the JVM. e.g.
-Djava.library.path=<dir where jacob library is>在Windows上,实际的本机库文件将被称为jacob-1.14.3-x86.dll而在Linux上,它将被称为libjacob-1.14.3-x86.so
On Windows, the actual native library file will be called jacob-1.14.3-x86.dll while on Linux it would be called libjacob-1.14.3-x86.so
更多推荐
UnsatisfiedLinkError的原因是什么?
发布评论