Here's my code:
Runtime re = Runtime.getRuntime();
BufferedReader output = null;
try{
Process cmd = re.exec("java -jar myProg.jar " + myArgument);
output = new BufferedReader(new InputStreamReader(cmd.getInputStream()));
}
catch (Exception e){
e.printStackTrace();
}
String line;
while ((line = output.readLine()) != null)
{
//process line
}
When debugging this code snippet, I find that when reading each line from output, it skips certain lines.
If i run this myProg.jar from command line, the text that's seen on my command line is not 100% the same as what I get when I process the output from inside my java program!
What could cause this? The output is all text.