This week's book giveaway is in the Performance forum. We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line! See this thread for details.
I have developed custom shell in java. It is used to execute some commands. It works like this:
User types command on the prompt, then it press "Enter" to execute it.
Command then executes and displays output on the shell and shell prompt is displayed to accept another command.
Just like normal shell.
Here the problem is, after user press "Enter" key to run command, the command takes some time to execute, in mean time if user types anything on console, it is displayed on the console. I don't want this to happen. How should I block user input while command is executing?