I am trying to load a dll native library using System.load
method, but it doesn't help, it throws exception.
Here is 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");
}
}
The program throws this exception:
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)