UnsatisfiedLinkError的原因是什么? [英] What is the cause of an UnsatisfiedLinkError?

查看:106
本文介绍了UnsatisfiedLinkError的原因是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试运行我的程序时,它会出现以下错误

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.com.LibraryLoader.loadJacobLibrary(LibraryLoader.java:184)
at com.jacob.com.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的原因是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆