什么是LD_LIBRARY_PATH和如何使用它? [英] What is LD_LIBRARY_PATH and how to use it?
问题描述
我参与开发一个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:java.library.path中没有JacobDB
不管我把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.
我没有什么经验,我不熟悉什么应该是该变量的意义和用法 - 你能帮助我吗? p>
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和如何使用它?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!