What is LD_LIBRARY_PATH and how to use it?(什么是 LD_LIBRARY_PATH 以及如何使用它?)
问题描述
我参与开发一个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 以及如何使用它?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:什么是 LD_LIBRARY_PATH 以及如何使用它?
基础教程推荐
- 问题http://apache.org/xml/features/xinclude测试日志4j 2 2022-01-01
- 修改 void 函数的输入参数,然后读取 2022-01-01
- 无法复制:“比较方法违反了它的一般约定!" 2022-01-01
- RabbitMQ:消息保持“未确认"; 2022-01-01
- Spring AOP错误无法懒惰地为此建议构建thisJoinPoin 2022-09-13
- 存储 20 位数字的数据类型 2022-01-01
- 如何对 Java Hashmap 中的值求和 2022-01-01
- Struts2 URL 无法访问 2022-01-01
- REST Web 服务返回 415 - 不支持的媒体类型 2022-01-01
- 使用堆栈算法进行括号/括号匹配 2022-01-01
