i’ve been trying to run this code but it will always give me error messages
enter image description here
this is my java project folder i added the lib folder to my classpath
first i tried the code as shown at the image it gives me this error message
PS C:UsersnadarrajDesktopZKFinger Standard SDK 5.3.0.33JavaZKFingerZKFinger> c:; cd 'c:UsersnadarrajDesktopZKFinger Standard SDK 5.3.0.33JavaZKFingerZKFinger'; & 'C:Program FilesJavajdk1.7.0_80binjava.exe' '-agentlib:jdwp=transport=dt_socket,server=n,suspend=y,address=localhost:51278' '-cp' 'C:UsersnadarrajAppDataLocalTempcp_59fi7e1yzn8vs3mnvewm68nf.jar' 'App'
Hello, World!
Exception in thread "main" java.lang.UnsatisfiedLinkError: no libzkfp in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1886)
at java.lang.Runtime.loadLibrary0(Runtime.java:849)
at java.lang.System.loadLibrary(System.java:1088)
at com.zkteco.biometric.ZKFPService.<clinit>(ZKFPService.java:7)
at com.zkteco.biometric.FingerprintSensorEx.Init(FingerprintSensorEx.java:6)
at App.main(App.java:6)
then i tried this and also tried to change the System.load()
method to System.loadLibrary("ZKFingerReader")
i also tried and added the extension to be ZKFingerReader.jar
but it didn’t work
import com.zkteco.biometric.*;
public class App {
static {
System.load("C:\Users\nadarraj\Desktop\ZKFinger Standard SDK 5.3.0.33\Java\ZKFinger\ZKFinger\lib\ZKFingerReader.jar");
}
public static void main(String[] args) {
System.out.println("Hello, World!");
FingerprintSensorEx.Init();
}
}
but it gives me this error message
PS C:UsersnadarrajDesktopZKFinger Standard SDK 5.3.0.33JavaZKFingerZKFinger> c:; cd 'c:UsersnadarrajDesktopZKFinger Standard SDK 5.3.0.33JavaZKFingerZKFinger'; & 'C:Program FilesJavajdk1.7.0_80binjava.exe' '-agentlib:jdwp=transport=dt_socket,server=n,suspend=y,address=localhost:51289' '-cp' 'C:UsersnadarrajAppDataLocalTempcp_59fi7e1yzn8vs3mnvewm68nf.jar' 'App'
Exception in thread "main" java.lang.UnsatisfiedLinkError: C:UsersnadarrajDesktopZKFinger Standard SDK 5.3.0.33JavaZKFingerZKFingerlibZKFingerReader.jar: %1 is not a valid Win32 application
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary1(ClassLoader.java:1965)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1890)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1851)
at java.lang.Runtime.load0(Runtime.java:795)
at java.lang.System.load(System.java:1062)
at App.<clinit>(App.java:6)
for the System.loadLibrary("ZKFingerReader")
i’ll get this error
PS C:UsersnadarrajDesktopZKFinger Standard SDK 5.3.0.33JavaZKFingerZKFinger> c:; cd 'c:UsersnadarrajDesktopZKFinger Standard SDK 5.3.0.33JavaZKFingerZKFinger'; & 'C:Program FilesJavajdk1.7.0_80binjava.exe' '-agentlib:jdwp=transport=dt_socket,server=n,suspend=y,address=localhost:51373' '-cp' 'C:UsersnadarrajAppDataLocalTempcp_59fi7e1yzn8vs3mnvewm68nf.jar' 'App'
Exception in thread "main" java.lang.UnsatisfiedLinkError: no ZKFingerReader in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1886)
at java.lang.Runtime.loadLibrary0(Runtime.java:849)
at java.lang.System.loadLibrary(System.java:1088)
at App.<clinit>(App.java:6)
Na9er is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.