什么是 LD_LIBRARY_PATH 以及如何使用它? [英] What is LD_LIBRARY_PATH and how to use it?

查看:26
本文介绍了什么是 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 以及如何使用它?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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