aspose file tools*
The moose likes Java in General and the fly likes Blocking user input Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Blocking user input" Watch "Blocking user input" New topic
Author

Blocking user input

sandeep kapse
Greenhorn

Joined: Jun 07, 2007
Posts: 25
Hi All,

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?

Any help is really appreciated! Thanks.

-Sandeep.

[ SCJP6, SCWCD5 ]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Blocking user input
 
Similar Threads
need help with user input
how to take and check input in Java
RMI remote command prompt
how to execute mail command in a shellscript
Creating a command prompt is swing