{"id":4694,"date":"2014-03-30T14:45:28","date_gmt":"2014-03-30T14:45:28","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/running-a-batch-file-from-java-collection-of-common-programming-errors\/"},"modified":"2014-03-30T14:45:28","modified_gmt":"2014-03-30T14:45:28","slug":"running-a-batch-file-from-java-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/running-a-batch-file-from-java-collection-of-common-programming-errors\/","title":{"rendered":"Running a batch file from java-Collection of common programming errors"},"content":{"rendered":"<p>I just downloaded MCP to see how things work behind the scenes in Minecraft.<\/p>\n<p>Inside MCP there are a bunch of batch files that you use to do things like: decompile, recompile, startclient, etc.<\/p>\n<p>What I would like to be able to do is run these batch files from a basic java gui.<\/p>\n<p>I&#8217;m good with the gui part but I havent got a clue how to run those batch files.<\/p>\n<p>Here is an example of one of the batch files:<\/p>\n<p><strong>The file is at:<\/strong><\/p>\n<p>C:\\MCP\\startclient.bat<\/p>\n<p><strong>startclient contains the following:<\/strong><\/p>\n<pre><code>@echo off\n\n:try_python\nset PYTHON=python\n%PYTHON% --version &gt;NUL 2&gt;NUL\nif errorlevel 1 goto try_python_mcp\ngoto foundit\n\n:try_python_mcp\nset PYTHON=runtime\\bin\\python\\python_mcp\n%PYTHON% --version &gt;NUL 2&gt;NUL\nif errorlevel 1 (\n    echo Unable to locate python.\n    pause\n    exit \/b\n)\n\n:foundit\n%PYTHON% runtime\\startclient.py conf\\mcp.cfg\npause\n<\/code><\/pre>\n<p>Can it be done?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I just downloaded MCP to see how things work behind the scenes in Minecraft. Inside MCP there are a bunch of batch files that you use to do things like: decompile, recompile, startclient, etc. What I would like to be able to do is run these batch files from a basic java gui. I&#8217;m good [&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-4694","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4694","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=4694"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4694\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=4694"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=4694"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=4694"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}