title: Purpose of java.library.path
body: <p>Perhaps this is a duplicate question, but I havn't found something by myself.</p>
  
  <p>Basically I have an understanding problem.</p>
  
  <p>I have an application which works fine when I call it as follows:</p>
  
  <pre><code>java -Duser.dir="some path" -Djava.library.path="pathToDLL1;pathToDLL2;pathToMyDir" classToCall par1
  </code></pre>
  
  <p>With the call above my application will start and run. </p>
  
  <p>My problem in understanding is within the <em>pathToMyDir</em> directory (the content of this directory is mainly some needed dll's).</p>
  
  <p>When I start the same application with following command it will fail.</p>
  
  <pre><code>java -Duser.dir="some path" -Djava.library.path="pathToMyDir;pathToDLL1;pathToDLL2" classToCall par1
  </code></pre>
  
  <p>I'm not sure if this is because of some dependencies, but I thought the java.library.path is mainly used to tell java where to look for external libraries. Or is this wrong? Is there also some order information hidden?</p>