![]() |
The Java Developers Almanac 1.4Order this book from Amazon. |
e91. Sending Input to a Commandtry { // Execute command String command = "cat"; Process child = Runtime.getRuntime().exec(command); // Get output stream to write from it OutputStream out = child.getOutputStream(); out.write("some text".getBytes()); out.close(); } catch (IOException e) { }
e90. Reading Output from a Command
© 2002 Addison-Wesley. |