value = inStream.read();
error = errorStream.read();
read() reads next byte of data from input stream
so in the 1st iteration its (char)value=h and (char)error=j. you are reading one character...
Type: Posts; User: RESHAM
value = inStream.read();
error = errorStream.read();
read() reads next byte of data from input stream
so in the 1st iteration its (char)value=h and (char)error=j. you are reading one character...
while ((value = inStream.read()) != -1 || (error = errorStream.read()) != -1) {
if (value > 0) {
System.out.print((char) value);
}
...
OutStreamAccumulator out = compiler.new OutStreamAccumulator(process.getInputStream());
getInputStream returns the only input stream connected to the normal output of the subprocess.
try using...