tomzx / gkm

⚠ Unsupported/Unmaintained ⚠️️ Global Keyboard and Mouse listener for node.js.
MIT License
52 stars 16 forks source link

JNativeHook.jar does not work with jdk15.0.2 64-bit (workaround available) #22

Open bomeers opened 3 years ago

bomeers commented 3 years ago

I recently updated to jdk15.0.2 and realized that gmk stopped working for me. I did however find a workaround for this issue:

  1. Download jnativehook-2.1.0.zip
  2. Open jnativehook-2.1.0.zip and navigate to jnativehook\jar\jnativehook-2.1.0.jar
  3. Extract jnativehook-2.1.0.jar to <project-path>\node_modules\gkm\lib\lib\
  4. Delete file JNativeHook.jar in <project-path>\node_modules\gkm\lib\lib\
  5. Re-name jnativehook-2.1.0.jar to JNativeHook.jar

I have yet to test this method with earlier versions of java.

tomzx commented 3 years ago

Did you have any specific error when you called java -jar JNativeHook.jar? #15 reported a core dump on Linux. What OS are you using? (given the path in your examples I assume Windows, but could you specify if it's W7/8/10, thanks!)

bomeers commented 3 years ago

Did you have any specific error when you called java -jar JNativeHook.jar? #15 reported a core dump on Linux. What OS are you using? (given the path in your examples I assume Windows, but could you specify if it's W7/8/10, thanks!)

I am using windows 10. JNativeHook.jar that comes with the gkm package wouldn't open for me when I tried to open it. The updated version does.