title: Why am I getting this UnsatisfiedLinkError with native code?
body: <p>I have a library called HelloWorld.so and a program HelloWorld.java with this content:</p>
  
  <pre><code>class HelloWorld {
       private native void print();
       public static void main(String[] args) {
           new HelloWorld().print();
       }
       static {
           System.loadLibrary("HelloWorld");
       }
   }
  </code></pre>
  
  <p>Now when I try to run HelloWorld.java I get this error:</p>
  
  <pre>
  $ /usr/java1.4/bin/java HelloWorld
  Exception in thread "main"
  java.lang.UnsatisfiedLinkError: no HelloWorld in java.library.path
          at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1491)
          at java.lang.Runtime.loadLibrary0(Runtime.java:788)
          at java.lang.System.loadLibrary(System.java:834)
          at HelloWorld.&lt;clinit>(HelloWorld.java:7)
  </pre>
  
  <p>Any tips?</p>