Runtime.Exec() not waiting
I am running the command "net use" using Runtime.exec().
Usually, net use prompts me for a username and password.
However, when I run the command in java, it prints out the request for username but then it terminates the program without waiting for the user to type in the username and password.
How do I make my program wait until the user types in the user name and password and how do I make my program receive this input.
Also... I used p.waitFor() but it really doesn't do much.
Help much appreciated!
Re: Runtime.Exec() not waiting
Get the input and output Stream's of the process. Here, I'll refer you to the most cited article on the subject: When Runtime.exec() won't - JavaWorld Try those examples with the Input/Ouput streams