Why does running a command with Runtime.exec() generate output under Windows but not generate output under Linux?

Nathan Meyers

Output from commands executed by Runtime.exec() is sent to streams that your application has to read: you can call Process.getInputStream() to get normal output from the command and Process.getErrorStream() to get error output.

Many MS-DOS executables send their output directly to the console instead of normal file streams, which is why you see it even if you are not reading the streams you should be reading.