Hi, I was running the "Global Keyboard Listener" test on ubuntu 20.04, and the program crashed when run from a directory containing space.
I was using "jnativehook-2.2.0.jar" directly, with the command:
java -cp "bin:lib/*" Test
the error output goes as follows:
Oct 12, 2021 11:44:35 PM com.github.kwhat.jnativehook.GlobalScreen
SEVERE: Unable to locate JNI library at /home/bubble/Desktop/coding/java/2021-10-12%20keyboard/lib/jnativehook-2.2.0.jar/com/github/kwhat/jnativehook/lib/linux/x86_64/libJNativeHook.so!
\
Exception in thread "main" java.lang.UnsatisfiedLinkError: Unable to locate JNI library at /home/bubble/Desktop/coding/java/2021-10-12%20keyboard/lib/jnativehook-2.2.0.jar/com/github/kwhat/jnativehook/lib/linux/x86_64/libJNativeHook.so!
\
at com.github.kwhat.jnativehook.GlobalScreen.(GlobalScreen.java:91)
at Test.main(Test.java:39)
It is obvious that "%20" in the path caused the problem.
Hi, I was running the "Global Keyboard Listener" test on ubuntu 20.04, and the program crashed when run from a directory containing space. I was using "jnativehook-2.2.0.jar" directly, with the command:
the error output goes as follows:
It is obvious that "%20" in the path caused the problem.