Double linebreak with BufferedReader on Win XP, but not other OSs…same code-Collection of common programming errors
I have some code that does a Runtime exec and parses the results. On linux and Windows7, the code works fine for parsing the system commands, but on Win XP I am getting a blank line (“”) between each line that has content. Any ideas what might be happening here?
Process output = Runtime.getRuntime().exec(command);
BufferedReader br = new BufferedReader(new InputStreamReader(output.getInputStream()));
while ((line = br.readLine()) != null)
{
//do stuff
}