title: how to package a native library into a jar file
body: <p>I have two projects: a standard java application (project A), and Java dynamic web application (project B). </p>
  
  <p>Project A itself makes calls to native libraries. I included this library in project A's build directory and everything runs fine as standalone (without involving project B). </p>
  
  <p>For Project B, I successfully hosted the application on Tomcat Server from within Eclipse; It works correctly when I don't involve project A.  </p>
  
  <p>Problem is when I in actually add code to project B to call project A, I get an error whenever project A tries to load its native library to compute some function that is implemented in in the native library. I get that the native library cannot be found. Where is the right place to put this library? </p>
  
  <p>Things I have tried:</p>
  
  <ul>
  <li>Exported project A as a runnable jar (while making sure to include<br>
  its native  library).</li>
  <li>Added the native library from project A,    directly into the
  WEB-INF/lib of Tomcat's directory for the host    server (project B).</li>
  <li>Added the the native library from project A    directly to the build
  path of project B.</li>
  </ul>
  
  <p>And none of these seem to work. I have seen some similar problem on SO, as I have summarized above. I'm I still missing something? </p>
  
  <p>Apologies for this one being long. It seems to be an eclipse config issue, and not code related. Thank you</p>