I would like to redirect a java process output towards the standard output of the parent java process.
Using the ProcessBuilder class as follows:
public
Try ProcessBuilder.inheritIO() to use the same I/O as the current Java process. Plus you can daisy chain the methods:
ProcessBuilder.inheritIO()
ProcessBuilder pb = new ProcessBuilder("cmd") .inheritIO() .directory(new File("C:")); pb.start();