1 Reply Latest reply on Feb 22, 2013 11:06 PM by jschellSomeoneStoleMyAlias

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


      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
          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.


          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.)