title: JNI - Package both 64-bit and 32-bit DLLs for Windows
body: <p>I use JNI in one of my Java applications and I want to package both 64-bit and 32-bit DLLs in the product for my Windows users. Is there a way (probably a naming convention) to follow so that <code>System.loadLibrary("foo")</code> automatically knows which file should be loaded? I currently use this workaround which I do not like:</p>
  
  <pre><code>// try to load foo64.dll and if faild, load foo32.dll
  try
  {
     System.loadLibrary("foo64");
  }
  catch (UnsatisfiedLinkError e)
  {
     System.loadLibrary("foo32");
  }
  </code></pre>