title: How to fix java.lang.UnsatisfiedLinkError-Problem with 64-bit / 32-bit Systems?
body: <p>I hava a 64-bit System and want want to run a Java-Application that needs to load a 32-bit dll-file. I want to load the libary using <strong><em>System.load()</em></strong>. When using a 64-bit Java-8-JRE the following error occurs: </p>
  
  <pre><code>java.lang.UnsatisfiedLinkError: C:\[...]\test.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform. 
  </code></pre>
  
  <p>When running the application on a 32-bit Java-6-JRE it sais</p>
  
  <pre><code>java.lang.UnsatisfiedLinkError: C:\[...]\test.dll: Can't find dependent libraries
  </code></pre>
  
  <p>I tried to use a 64-bit version of Java. Because the dll is a 32-bit dll I tried to run the application on a 64-bit-version. But then another error occures.</p>
  
  <p>I also tried to use <strong><em>System.loadLibrary()</em></strong> instead. But the errors seem to be similar.</p>
  
  <p>Java-8-64-bit:</p>
  
  <pre><code>java.lang.UnsatisfiedLinkError: C:\Windows\System32\test.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform
  </code></pre>
  
  <p>--> Because of this error I can be sure java is able to find this file in general.</p>
  
  <p>Java-6-32-bit:</p>
  
  <pre><code>java.lang.UnsatisfiedLinkError: no test in java.library.path
  </code></pre>
  
  <p>--> Because of the error shown before the file have to be there.</p>
  
  <p>My code of the application is very short:</p>
  
  <p>Using <strong><em>System.load()</em></strong>:</p>
  
  <pre><code>public static void main(String[] args) {
      System.load("C:\\[...]\\test.dll");
  }
  </code></pre>
  
  <p>Using <strong><em>System.loadLibary()</em></strong>:</p>
  
  <pre><code>public static void main(String[] args) {
      System.loadLibrary("test");
  }
  </code></pre>
  
  <p>The file has all necessary permissions.</p>
  
  <p>The typical error that the file is not in the PATH can be excluded because running a 64-bit-JVM the file can be found but can not be read because it needs a 32-bit JVM.</p>
  
  <p>Has anybody any ideas? Thanks!</p>