title: How to load different native libraries(dll, so) based on the system the application is running
body: <p>I have a native library that I call using JNI. Call to the native library works fine in Linux. </p>
  
  <p>My questions is if I create a <code>.so</code> and <code>.dll</code> file for Linux and Windows and add them to the project, is there a way to load the right library based on the operating system my application is running on when calling <code>System.LoadLibrary("myLib")</code>?</p>
  
  <p>In other words, what would be the right implementation of the pseudo-code below ?</p>
  
  <pre><code>if(Windows){
     System.LoadLibrary("myLib.dll");
  }else if(Linux){
     System.LoadLibrary("myLib.so");
  }
  </code></pre>
  
  <p>Thanks</p>