It's possible but requires an implementation taking advantage of JNI which will not always be portable.
Java System Hook is one such library that will work with Windows 32 & 64 bit.
1.4m articles
1.4m replys
5 comments
56.9k users