{"id":4999,"date":"2014-03-30T17:42:41","date_gmt":"2014-03-30T17:42:41","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/how-can-i-change-this-code-so-that-the-command-prompt-closes-when-it-finishes-executing-collection-of-common-programming-errors\/"},"modified":"2014-03-30T17:42:41","modified_gmt":"2014-03-30T17:42:41","slug":"how-can-i-change-this-code-so-that-the-command-prompt-closes-when-it-finishes-executing-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/how-can-i-change-this-code-so-that-the-command-prompt-closes-when-it-finishes-executing-collection-of-common-programming-errors\/","title":{"rendered":"How can I change this code so that the command prompt closes when it finishes executing?-Collection of common programming errors"},"content":{"rendered":"<p>Store the <code>Runtime<\/code> object in a variable to use it, and then call it&#8217;s <code>exit()<\/code> method when you&#8217;re done.<\/p>\n<p><em>exit(int status)<\/em>:<\/p>\n<blockquote>\n<p>Terminates the currently running Java virtual machine by initiating its shutdown sequence.<\/p>\n<\/blockquote>\n<p>Without storing in a variable:<\/p>\n<pre><code>Runtime.getRuntime().exit(0);\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Store the Runtime object in a variable to use it, and then call it&#8217;s exit() method when you&#8217;re done. exit(int status): Terminates the currently running Java virtual machine by initiating its shutdown sequence. Without storing in a variable: Runtime.getRuntime().exit(0);<\/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-4999","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4999","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=4999"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4999\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=4999"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=4999"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=4999"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}