aspose file tools*
The moose likes Java in General and the fly likes Need to handle the interactive command using java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Need to handle the interactive command using java" Watch "Need to handle the interactive command using java" New topic
Author

Need to handle the interactive command using java

shital sonavane
Greenhorn

Joined: Jan 28, 2011
Posts: 20

Hi,
I want to handle the interactive command using java. Dont know how to do this.

For example i am executing command -su on linux machine. after this command execution we need to enter the password.
This is the example not the exact command.

Please suggest me the solution.

Thanks in advance.

Jeff Verdegan
Bartender

Joined: Jan 03, 2004
Posts: 6109
    
    6

You'll want a loop that reads a line from System.in and then processes that line.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Need to handle the interactive command using java
 
Similar Threads
problem running SSH with JSP
Trapping of different shells like DOS,Unix
How to Run a command
Command line question
Read mail file using script