In this specific case of reading input from a spawned cmd.exe subprocess the end-of-file for the output from the subprocess does not occur and the reader hangs.
See the attached reproducible program on (Java 7u25)
The application spawns an interactive copy of cmd.exe (but without any input or output)
and a second cmd.exe /? from which stdout and stderr are read.
The reads from the second cmd.exe hang after reading the output; it does not receive a -1 (eof) from read.
Not reproducible on Java 8.