title: Exporting to Runnable jar with extra native code libraries in eclipse
body: <p>I am having trouble exporting my java project from eclipse as a jar executable file. My java project uses an external library (its called jri). I have exported the jri.jar file and set the library path for its native library in eclipse, and it works great in development in eclipse. However, when I export it as an executable jar file I get the following error:</p>
  
  <pre><code>Cannot find JRI native library!
  Please make sure that the JRI native library is in a directory listed in java.library.path.
  </code></pre>
  
  <p>I have placed a folder called lib in the same directory as my project's jar; this lib folder contains jri's native library. jri's native library is not in one file but in a folder. This is the same setup I have in eclipse.</p>
  
  <p>The way I am exporting my project in eclipse is</p>
  
  <pre><code>Export...
  Java &gt; Runnable JAR file
  Copy required libraries into a sub folder next to the generated Jar
  Finish
  </code></pre>
  
  <p>And my folder is organized like this</p>
  
  <pre><code>folder project
    project.jar
    project_lib
      jri.jar
      jri native library folder  
  </code></pre>
  
  <p>The MANIFEST.MF of my project.jar is:</p>
  
  <pre><code>Manifest-Version: 1.0
  Class-Path: . project_lib/jri.jar
  Main-Class: index
  </code></pre>
  
  <p>What I want to achieve is to give another person a folder including project.jar and anything else needed so she/he can run it without needing to install anything else.
  Thanks so much</p>