I\'m trying to redirect stdin and stdout of a subprocess in java, eventually i\'m going to have the output go to a JTextArea or something.
Here is my current code,>
Nowadays Runtime.getRuntime().exec() is deprecated (for all practical purposes). Better use the ProcessBuilder class; in particular, its start() method will return a Process object with methods for accessing the stdin and stdout streams, which can be redirected wherever you need them. Take a look at this post for further details.