title: native libraries are not loaded in java application
body: <p>I have to find system information in an applications and for this I have two native library files as given below:
  <code>SystemManagerLinux.so</code> and <code>SystemManagerWin32.dll</code>. </p>
  
  <p>I have to use these library files in my java code to show the information on java GUI. I have put these files on the location: <code>C:\Users\surjit\Documents\NetBeansProjects\SampleMonitor</code> and give it is as vm argument in my netbeans ide on run option as given below:</p>
  
  <pre><code>-Djava.library.path="C:\Users\surjit\Documents\NetBeansProjects\SampleMonitor"
  </code></pre>
  
  <p>and call the libraries as in the code :</p>
  
  <pre><code>if (os.startsWith("Linux"))
     loadTmpLibrary("SystemManagerLinux.so", "libSML", ".so");
  else if (os.startsWith("Windows")) {
     loadTmpLibrary("SystemManagerWin32.dll", "SMW", ".dll");
  </code></pre>
  
  <p>But when I am running the application it is giving following error:</p>
  
  <pre><code>Exception in thread "main" java.lang.UnsatisfiedLinkError:     SystemManagerWin32.fetchProcessIDs([I)I
      at SystemManagerWin32.fetchProcessIDs(Native Method)
      at SystemMonitor.refreshPidList(SystemMonitor.java:168)
      at SystemMonitor.&lt;init&gt;(SystemMonitor.java:383)
      at SystemMonitor.main(SystemMonitor.java:494)
  Exception in thread "Thread-2" java.lang.UnsatisfiedLinkError:    SystemManagerWin32.fetchSystemMemoryStatus(LSystemMemoryStatus;)Z
      at SystemManagerWin32.fetchSystemMemoryStatus(Native Method)
      at SystemMonitor.run(SystemMonitor.java:410)
      at java.lang.Thread.run(Thread.java:722)
  </code></pre>
  
  <p>Please suggest me solution.Thanks</p>