Processes can output to 2 distinct streams, stdout and stderr. While you see these two as one in a command box, they are still distinct. When reading one, you will not see the results of the other.
There are ways to redirect them, so that they both go to the same stream:
- in
Java, use System.setOut(System.err) or System.setErr(System.out).
- if that is not possible, you can use OS redirection. After your command you add a 2>&1 to redirect the error stream to the output stream and >&2 for the other way around. E.g, "someCommand -paramater value <any other input to the command here> 2>&1". There cannot be any spaces around the >.