Sep 09

Write your input to the output stream returned by the getOutputStream() method of the java.util.Process.

// Execute command

Process process = Runtime.getRuntime().exec(command);

// Get output stream to send command to process
OutputStream out = process.getOutputStream();

// send command
out.write("input text".getBytes());

written by objects \\ tags: , ,

Leave a Reply

You must be logged in to post a comment.