I have this python script that imports a zkemkeeper
dll and connects to a time attendance device(ZKTeco
). Here is is a script I'm using:
from win32com.client import Dispatch
zk = Dispatch("zkemkeeper.ZKEM")
zk.Connect_Net("192.168.0.17", 4370)
print(zk.StartIdentify())
print(zk.StartEnrollEx(7, 2, 1))
This works fine as expected. However I want to achieve the same using java. How can I call that Connect_Net
method?
I tried the following in java but didn't work:
public class ZKEM {
static {
System.loadLibrary("zkemkeeper");
}
ZKEM() {
}
public static native boolean Connect_Net(String IPAdd, int Portl);
}
public class Main {
public static void main(String[] args) {
System.err.println(ZKEM.Connect_Net("192.168.0.17", 4370));
}
}