jnativehook icon indicating copy to clipboard operation
jnativehook copied to clipboard

org.jnativehook.DefaultLibraryLocator Exception in Application start method java.lang.reflect.InvocationTargetException

Open sumitrvi opened this issue 6 years ago • 1 comments

May 17, 2019 12:58:29 PM trackingapplication.GlobalScreen SEVERE: org.jnativehook.DefaultLibraryLocator Exception in Application start method java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:389) at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:328) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:767) Caused by: java.lang.RuntimeException: Exception in Application start method at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:917) at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$412(LauncherImpl.java:182) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.UnsatisfiedLinkError: org.jnativehook.DefaultLibraryLocator at trackingapplication.GlobalScreen.(GlobalScreen.java:96) at trackingapplication.LoginController.initialize(LoginController.java:181) at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2548) at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2441) at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3214) at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3175) at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3148) at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3124) at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3104) at javafx.fxml.FXMLLoader.load(FXMLLoader.java:3097) at trackingapplication.TrackingApplication.start(TrackingApplication.java:52) at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$419(LauncherImpl.java:863) at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$399(PlatformImpl.java:326) at com.sun.javafx.application.PlatformImpl.lambda$null$397(PlatformImpl.java:295) at java.security.AccessController.doPrivileged(Native Method) at com.sun.javafx.application.PlatformImpl.lambda$runLater$398(PlatformImpl.java:294) at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95) at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method) at com.sun.glass.ui.gtk.GtkApplication.lambda$null$203(GtkApplication.java:139) ... 1 more Exception running application trackingapplication.TrackingApplication Java Result: 1

sumitrvi avatar May 17 '19 07:05 sumitrvi

I am going to need a demo project for how you are launching the JavaFX program. You probably need to specify the native library manually. Read up on java.library.path and JavaFX. You can also create a library loader implementation: https://github.com/kwhat/jnativehook/wiki/LibraryLoading

kwhat avatar Jul 25 '19 15:07 kwhat