I am trying to create a new console in java and get the ouput stream.
I tried this way:
Process p = Runtime.getRuntime().exec("cmd.exe /c start");
BufferedWriter out = new BufferedWriter( new OutputStreamWriter(
p.getOutputStream()));
the console appears, but I can not write something in the stream!
Another way:
Process p = Runtime.getRuntime().exec("cmd.exe");
BufferedWriter out = new BufferedWriter(new OutputStreamWriter(
p.getOutputStream()));
This time I can write to the stream, but the console does not multiply!
I lack knowledge: /
Thanks in advance.
source
share