I start a process with ProcessBuilder and want to write the output to log4j. How can I achieve this?
I know that I can redirect the output of the process to a File and then read that File back, but I hope there is some easier way.
I would like to avoid to write my own OutputStream implementation if there is a simpler solution. I hope that I am not the first who would like to get the output of a ProcessBuilder as a "good java object" like a
List<String>
or something else which is easy to handle.