title: Jar loading DLL Can't find dependent libraries
body: <p>I need to load a DLL is located somewhere out of my Jar file, but whenever I do try to run the Jar I get the following error:</p>
  
  <pre><code>java.lang.UnsatisfiedLinkError: E:\test.dll : Can't find dependent libraries
          at java.lang.ClassLoader$NativeLibrary.load(Native Method)
          at java.lang.ClassLoader.loadLibrary0(Unknown Source)
          at java.lang.ClassLoader.loadLibrary(Unknown Source)
          at java.lang.Runtime.load0(Unknown Source)
  </code></pre>
  
  <p>The issue is not from the DLL, it's compiled to 64 bit machine as my PC is 64 bit, it has no dependencies, the issue only occurs when running from the Jar, when I run the application through my Eclipse it runs fine and everything loads fine.</p>
  
  <p>The code code I using to load the DLL is:</p>
  
  <pre><code>File libraryFile = new File("E:\test.dll");
  Runtime.getRuntime().load(libraryFile .getPath());
  </code></pre>
  
  <p>I used Eclipse to Jar the application.</p>
  
  <p><strong>EDIT</strong>
  I tried Jarring using different applications, such as <code>Jar Maker</code> and <code>Jar Builder</code> but nothing helps</p>
  
  <p><strong>EDIT 2</strong>
  I tried to run this exact application, it works from the IDE but not from the Jarred file, tried moving the DLL but that didn't help as well:</p>
  
  <pre><code>public class Test {
  
      public static void main(String[] args) throws Exception {
          System.load("E:\\test.dll");
      }
  }
  </code></pre>