When executing some command(let's say 'x') from cmd line, I get the following message: "....Press any key to continue . . .". So it waits for user input to unblock.
But when I execute the same command ('x') from java:
Process p = Runtime.getRuntime().exec(cmd, null, cmdDir);
// here it blocks and cannot use outputstream to write somnething
p.getOutputStream().write(..);
the code blocks...
I tried to write something into the process's output stream, but how can i do that sice the code never reaches that line ?