5

I'm doing a program that calculates keyboard mouse mobility on Windows, Mac, and Linux with JAVA. I'm using JNativeHook for get keyboard and mouse moves. It works fine in Windows and Linux, but after 10-15 minutes on MacOS , pc is freezing and I have to restart the computer.

I've tried unregister JnativeHook (GlobalScreen.unregisterNativeHook();) and register it again (GlobalScreen.registerNativeHook();) every 10 seconds. Now i am having the problem every 2-3 days. 10 minutes to 2-3 days, but this is not the exact solution.

This not my latest code, but the problem is the basic code https://github.com/erYunusTR/MouseKeyboardListener

The problem occurs when you run the application as .app(MacOS App), it does not occur when you run it as jar or run on ide

Have you ever had a Mac user living this before? or do you have suggestions?

Yunus ER
  • 1,999
  • 2
  • 9
  • 14

0 Answers0