Search code examples
javac++environment-variablesjacob

What is LD_LIBRARY_PATH and how to use it?


I take part in developing a Java project, which uses some C++ components, thus I need Jacob.dll. (on Windows 7)

I keep getting java.lang.UnsatisfiedLinkError: no JacobDB in java.library.path no matter where I put Jacob.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?


Solution

  • 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