Hey guys, I have a java console app that basically just sets up some infrastructure and then spawns a quartz scheduler and for the most part the main thread goes to sleep, idling in a loop with Thread.sleep(x) in it. All the work will be done by the job classes fired off from the scheduler threads.
So how can I send this console app a termination signal from the keyboard? I thought control-c would work, but within Eclipse, anyway, it doesn't. I have a shutdown hook, so if the process is teminated I get control and can clean up, but I want to be able to signal this on command without sending it from a shell using kill.
How would you set up the main loop so that you could get, say, a ctrl-c and break out?
Thanks.
So how can I send this console app a termination signal from the keyboard? I thought control-c would work, but within Eclipse, anyway, it doesn't. I have a shutdown hook, so if the process is teminated I get control and can clean up, but I want to be able to signal this on command without sending it from a shell using kill.
How would you set up the main loop so that you could get, say, a ctrl-c and break out?
Thanks.