Java Hardware Interrupt Handling
问题 I would like to know if it is possible to automatically invoke a Java method when a hardware interrupt is raised. 回答1: There may be an alternative. I'm doing something similar: In an application I monitor 4 mice for clicks. Those clicks generate interrupts but I'm happy enough not to deal with them directly from Java. Under Linux, it turns out there are device files ( /dev/input/mouse# ) that spew a bunch of characters when something happens with the mouse. I have a Thread for each one with a