UnsatisfiedLinkError的原因是什么?

编程入门 行业动态 更新时间:2024-10-26 02:30:10
本文介绍了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.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的原因是什么?

本文发布于:2023-11-26 03:19:26,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1632423.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:原因   UnsatisfiedLinkError

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!