I have a java program that is running in the background(Windows). I would like to bind a key that will terminate the process in some way, even if you are currently working in another program. Is this possible?
Basically I would like to do something like:
If(KeyPressed)
//break from main loop;
You’d need to use JNI. I’ve used this with some success:
http://code.google.com/p/jnativehook/