title: how to load native java library
body: <p>I am trying to load a dll native library using <code>System.load</code> method, but it doesn't help, it throws exception.</p>
  
  <p>Here is code:</p>
  
  <pre><code>package test;
  
  import org.springframework.context.annotation.AnnotationConfigApplicationContext;
  import one.xmpp.server.network.BigResponseServer;
  
  public class main {
      static {
          System.load("D:\\one-xmpp-proxy-master\\one-xmpp-proxy-master\\libs\\tcnative-1.dll");
      }
  
      public static void main(String [] args) {
          Runtime.getRuntime().loadLibrary("tcnative-1.dll");     
      }
  }
  </code></pre>
  
  <p>The program throws this exception:</p>
  
  <pre><code>Exception in thread "main" java.lang.UnsatisfiedLinkError: no tcnative-1.dll in java.library.path
      at java.lang.ClassLoader.loadLibrary(Unknown Source)
      at java.lang.Runtime.loadLibrary0(Unknown Source)
      at java.lang.Runtime.loadLibrary(Unknown Source)
      at test.main.main(main.java:26)
  </code></pre>