When running a process, how do I pipe it’s output to System.out and it’s input to System.in:
Process p = Runtime.getRuntime().exec("cubc.exe");
// do something with p.getOutputStream())
EDIT: I think I explained this wrong; I don’t want to input to the program, I want the user to input to the program, and I don’t want to read the output, I want the user to read the output.
Using
IOUtilsclass from Apache Commons IO: