1 Reply Latest reply: Feb 22, 2013 5:06 PM by jschellSomeoneStoleMyAlias RSS

    java.lang.UnsatisfiedLinkError:  Can't find dependent libraries

    992679
      Hi,

      I am new to JNI.

      But I got some examples from internet. That example is working fine.(hello world) ref : http://codeandme.blogspot.in/2011/09/jni-made-easy.html

      But the same procedure i followed, i didnt get the output. it throwing the exception like below

      java.lang.UnsatisfiedLinkError: D:\samples\JNISampleProject\resources\libadd.dll: Can't find dependent libraries
           at java.lang.ClassLoader$NativeLibrary.load(Native Method)
           at java.lang.ClassLoader.loadLibrary0(Unknown Source)
           at java.lang.ClassLoader.loadLibrary(Unknown Source)
           at java.lang.Runtime.load0(Unknown Source)
           at java.lang.System.load(Unknown Source)
           at com.jni.addition.AddTwoNumbers.<clinit>(AddTwoNumbers.java:8)
      Exception in thread "main"

      I installed CDT & MINGW (mingw-get-inst-20120426.exe)

      Anyone can help?

      Thanks in advance.

      Waiting for reply...

      - Bala
        • 1. Re: java.lang.UnsatisfiedLinkError:  Can't find dependent libraries
          jschellSomeoneStoleMyAlias
          989676 wrote:
          java.lang.UnsatisfiedLinkError: D:\samples\JNISampleProject\resources\ libadd.dll: Can't find dependent libraries
          The library depends on other libraries. Which are missing.

          You can use Dependency Walker to figure it out although it takes work.

          http://www.dependencywalker.com/

          However if you built that dll, then you can figure out what it used to build and that is usually faster. And it probably means something is missing in the execution path (versus build path.)