title: JNI System.LoadLibrary failed on Cocoa dylib
body: <p>following JNI guidelines, I created a dylib (in Objective-C) using Xcode and expected to load it in my Java project, like the following does,</p>
  
  <pre><code>public class Main {
  private native void done();
      public static void main(String[] args) {
          New Main().done();
  }
  
  static {
      System.loadLibrary("Test");
  }
  
  public Main() {
      super();
  }
  </code></pre>
  
  <p>and I am getting the following runtime error -</p>
  
  <pre><code>Exception in thread "main" java.lang.UnsatisfiedLinkError: no Test in java.library.path
  at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1754)
  at java.lang.Runtime.loadLibrary0(Runtime.java:823)
  at java.lang.System.loadLibrary(System.java:1045)
  at Main.&lt;clinit&gt;(Main.java:27)
  </code></pre>
  
  <p>How could I get this fixed? </p>