How do I use SwingEventMonitor to monitor mouse events in applications running in other JVMs?
The demo code I have can monitor mouse clicks in applications running within its own JVM, but applications started seperately or via jnlp are ignored.
How do I make sure Java loads my SwingEventMonitor app with every application, regardless of how its started (desktop or jnlp)
Run your monitor and create a sever = ServerSocket(MONITOR_PORT)
. Then listen for incoming connections:
while (true) {
Socket socket = server.accept();
connectionCount++;
// start a new monitor thread for this connection
}
Note: SwingEventMonitor is not included anymore in JDK1.7, you may wish to push your own EventQueue. See What happened to SwingEventMonitor?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With