How to interact (input and output) with Process and Runtime?
807603Aug 20 2007 — edited Jan 8 2008I'm creating a Java class which will execute other applications or shell scripts.
It works fine for batch processes and applications which just writes stuff on the screen.
But how can I accomplish interaction with a an application in case it requests user input? I know I can use Process.getInputStream() and Process.getOutputStream(), but how can I tell if the sub-process is requesting a user input, and then print out the output again, and so on, until the end of the process?
I don't know if I made myself clear, I only have code to execute and output the sub-process.
Thanks in advance,
Christian