{"id":4769,"date":"2014-03-30T15:17:14","date_gmt":"2014-03-30T15:17:14","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/get-output-from-bat-file-using-java-collection-of-common-programming-errors\/"},"modified":"2014-03-30T15:17:14","modified_gmt":"2014-03-30T15:17:14","slug":"get-output-from-bat-file-using-java-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/get-output-from-bat-file-using-java-collection-of-common-programming-errors\/","title":{"rendered":"Get output from BAT file using Java-Collection of common programming errors"},"content":{"rendered":"<p>Using &#8220;cmd \/c start [&#8230;]&#8221; to run a batch file will create a sub process instead of running your batch file directly.<\/p>\n<p>Thus, you won&#8217;t have access to its output. To make it work, you should use:<\/p>\n<pre><code>String cmd = \"C:\\\\workspace\\\\temp.bat\";\n<\/code><\/pre>\n<p>It works under Windows XP.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Using &#8220;cmd \/c start [&#8230;]&#8221; to run a batch file will create a sub process instead of running your batch file directly. Thus, you won&#8217;t have access to its output. To make it work, you should use: String cmd = &#8220;C:\\\\workspace\\\\temp.bat&#8221;; It works under Windows XP.<\/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-4769","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4769","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=4769"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4769\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=4769"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=4769"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=4769"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}