The Runtime.exec() methods all return a process instance. The Process
class includes methods for retrieving the error stream, input stream and
output stream of the process. You would need to try to read data from
the output stream and then send the appropriate data back to the process
through the input stream.