问题描述
我参与开发一个Java项目,它使用了一些C++组件,因此我需要Jacob.dll
.(在 Windows 7 上)
I take part in developing a Java project, which uses some C++ components, thus I need Jacob.dll
. (on Windows 7)
我不断收到 java.lang.UnsatisfiedLinkError: no JacobDB in java.library.path
无论我将 Jacob.dll 放在哪里......
I keep getting java.lang.UnsatisfiedLinkError: no JacobDB in java.library.path
no matter where I put Jacob.dll....
我寻找了可能的决定,到目前为止我还没有尝试过设置 LD_LIBRARY_PATH
变量,指向 .dll 文件.
I looked for possible decisions and the one that I haven't tried so far is setting the LD_LIBRARY_PATH
variable, pointing at the .dll file.
我没有什么经验,也不熟悉该变量的含义和用法 - 你能帮帮我吗?
I have little experience and I'm not familiar with what should be the meaning and usage of that variable - can you help me?
推荐答案
通常你必须在JVM的命令行上设置java.library.path
:
Typically you must set java.library.path
on the JVM's command line:
java -Djava.library.path=/path/to/my/dll -cp /my/classpath/goes/here MainClass
这篇关于什么是 LD_LIBRARY_PATH 以及如何使用它?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!