title: [Linux]Load .so file for JNI results in: java.lang.UnsatisfiedLinkError: no libdebug in java.library.path
body: <p>I need some native C++ code to be called within my Java application so I use 'System.loadLibrary(String)' to load the required .so file, but when I try to execute the Java application from Eclipse I get this error message:</p>
  
  <pre><code>Exception in thread "main" java.lang.UnsatisfiedLinkError: no libdebug in java.library.path
      at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1734)
      at java.lang.Runtime.loadLibrary0(Runtime.java:823)
      at java.lang.System.loadLibrary(System.java:1028)
      at org.server.util.Debug.&lt;clinit&gt;(Debug.java:5)
      at org.server.Server.main(Server.java:18)
  </code></pre>
  
  <p>The library path property setting is:</p>
  
  <pre><code>java.library.path="/home/benjamin/Downloads/jdk1.6.0_24/jre/lib/i386/client:/home/benjamin/Downloads/jdk1.6.0_24/jre/lib/i386"
  </code></pre>
  
  <p>And I placed libdebug.so in /home/benjamin/Downloads/jdk1.6.0_24/jre/lib/i386/.
  The .so file was compiled like this:</p>
  
  <pre><code>g++ -I /home/benjamin/Downloads/jdk1.6.0_24/include 
      -I /home/benjamin/Downloads/jdk1.6.0_24/include/linux -fPIC -c debug.cpp 
      -o /home/benjamin/workspace/server/bin/linux-x86/debug.o
  </code></pre>
  
  <p>And linked like this:</p>
  
  <pre><code>ld -shared -soname Debug.so.1 -o Debug.so.1.0 -lc debug.o
  </code></pre>