title: How to debug a java system.loadlibrary error in linux?
body: <p>I have a Java program that is calling C code through JNI that I'm attempting to run on Linux.  The external code consists of two .so files: one for the JNI bindings (built with swig) and the other with the actual functions.  I have the two libraries in the same directory and LD_LIBRARY_PATH is set correctly.  ldd reports no problems when running from the command line, but when I set the LD_LIBRARY_PATH to the same value in the "run configurations" dialog in the Eclipse editor and attempt to execute the program, it gets the following error:</p>
  
  <p>java.lang.UnsatisfiedLinkError: [path to libraries]/[JNI binding library].so: [actual code library].so: cannot open shared object file: No such file or directory</p>
  
  <p>This leads me to believe that the JNI wrapper library is loaded successfully, but there is a failure when that library attempts to load the library containing the actual code.  Is there any way to debug this further?</p>
  
  <p>I will further note that this problem is happening in the eclipse editor itself and that I haven't attempted to package the code into a jar and run it within a free-standing jvm instance.</p>