Dear all,
I am a new programmer for K8055D. I want to build a interface between the .dll and my main code. However, I have tried to use JNI (eclipse) to open the device and I fail. I don’t know why. Here is the code:
import java.util.*;
public class driver {
public native long OpenDevice(long i);
static {
System.loadLibrary("K8055D");
}
public static void main(String[] args) {
try{
driver newdriver=new driver();
newdriver.OpenDevice(0);
}catch(Exception e){
System.out.println("No!");
}
}
}
I think I did everything correct. But, there is a error message:
Exception in thread “main” java.lang.UnsatisfiedLinkError: driver.OpenDevice(J)J
I have been looking around for solution for a while. I really appreciate your help!
Best,
Johnny