JNativeHook doesn't work with Jython (JES)

53 Views Asked by At

I was trying to implement JNativeHook on jython, using JES.

I tried using JNativeHook on pure Java, and it does work as expected, yet, the same thing on jython throws an exception.

The exception NoClassDefFoundError occurs on GlobalScreen.registerNativeHook().

Why is that?

P.S. I checked the java.library.path of both Java and Jython, and they are the exact same.

Edit: Tested some more and found out that the whole GlobalScreen class throws NoClassDefFoundError exceptions when using its methods.

Edit 2: Doing dir(GlobalScreen) jython can actually see the methods of the class, yet exceptions get thrown on use.

0

There are 0 best solutions below