{"id":5833,"date":"2014-04-07T09:34:11","date_gmt":"2014-04-07T09:34:11","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/04\/07\/double-linebreak-with-bufferedreader-on-win-xp-but-not-other-osssame-code-collection-of-common-programming-errors\/"},"modified":"2014-04-07T09:34:11","modified_gmt":"2014-04-07T09:34:11","slug":"double-linebreak-with-bufferedreader-on-win-xp-but-not-other-osssame-code-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/04\/07\/double-linebreak-with-bufferedreader-on-win-xp-but-not-other-osssame-code-collection-of-common-programming-errors\/","title":{"rendered":"Double linebreak with BufferedReader on Win XP, but not other OSs&hellip;same code-Collection of common programming errors"},"content":{"rendered":"<p>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 (&#8220;&#8221;) between each line that has content. Any ideas what might be happening here?<\/p>\n<pre><code>Process output = Runtime.getRuntime().exec(command);\nBufferedReader br = new BufferedReader(new InputStreamReader(output.getInputStream()));\nwhile ((line = br.readLine()) != null)\n{\n   \/\/do stuff\n}\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>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 (&#8220;&#8221;) between each line that has content. Any ideas what might be happening here? Process output = Runtime.getRuntime().exec(command); BufferedReader [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-5833","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5833","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=5833"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5833\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=5833"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=5833"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=5833"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}