I’m trying to use dll in my java application in eclipse, but I’m getting runtime exception whenever I try to call any method associated with that dll.
The dll exists in the following address, which I’ve passed in Run/Debug Settings in eclipse:
-Djava.library.path="C:\Program Files\NPortAdminSuite\ipserial\lib\x86;${env_var:PATH}"
Code:
class Test {
public native int nsio_init();
public static void main(String[] args) {
System.loadLibrary("ipserial");
new Test().nsio_init(); //This part is throwing an exception
}
}
Error:
Exception in thread "main" java.lang.UnsatisfiedLinkError: NPortConnection.nsio_init()I
at Test.nsio_init(Native Method)
at Test.main(Test.java:27)
The command dumpbin /exports "C:\Program Files\NPortAdminSuite\ipserial\lib\x86\IPSerial.dll" also returning me the name of method, which I’m trying to call from that dll

Could anyone please tell how to solve this problem?
Looks like you are trying to call a dll function directly from java code. This is not possible (directly). You need to write a layer that translates between java and the native dll.
Have a look at these resources:
Another way around the problem is to use JNA, check out the wikipedia article for example.