I have a Java program processing a large set of XML files. The process takes several hours to run and sometimes I need to stop. For now I use CTRL-C to kill it, make a note of which file it was working on, and later I remove the data for those files and re-process them.
Is there a way to have Java keep working while waiting for user input on the command line, and furthermore can I have it keep outputting log info to the command prompt while it listens?
I considered having it wait for user input a few seconds between files, but this would add more time to overall processing, and I'm not sure there's a way to timeout user input easily.