{"id":223,"date":"2014-10-16T06:35:42","date_gmt":"2014-10-16T06:35:42","guid":{"rendered":"http:\/\/muse.oneshot.in\/?p=223"},"modified":"2014-10-16T06:44:10","modified_gmt":"2014-10-16T06:44:10","slug":"how-to-install-java-and-set-java_home-permanently","status":"publish","type":"post","link":"https:\/\/muse.oneshot.in\/?p=223","title":{"rendered":"How to install Java and set JAVA_HOME permanently"},"content":{"rendered":"<p>1. Install Java<\/p>\n<p>If you have already installed Java then skip to point 3.<\/p>\n<p>Before continue make sure you don&#8217;t have installed Java.<\/p>\n<p>Open terminal and invoke:<\/p>\n<p>whereis java<\/p>\n<p>command. If you do not have Java then you will see:<\/p>\n<p>java:<\/p>\n<p>That will mean you DONT have Java.<\/p>\n<p>Download Java from here or use your package manager to install it.<br \/>\n2. Java location<\/p>\n<p>By default Java is located in<\/p>\n<p>\/usr\/lib\/jvm\/java-<version><\/p>\n<p>directory.<br \/>\n3. Set $JAVA_HOME variable<\/p>\n<p>To set JAVA_HOME only in actual shell session, invoke command:<\/p>\n<p>export JAVA_HOME=\/usr\/lib\/jvm\/java-<version><\/p>\n<p>To persist this environment variable edit vi ~\/.bash_profile file, and add JAVA_HOME definition:<\/p>\n<p>JAVA_HOME=\/usr\/lib\/jvm\/java-<version><\/p>\n<p>Save and relogin to apply changes.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>1. Install Java If you have already installed Java then skip to point 3. Before continue make sure you don&#8217;t have installed Java. Open terminal and invoke: whereis java command. If you do not have Java then you will see: java: That will mean you DONT have Java. Download Java from here or use your [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":225,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,3,6,4],"tags":[],"class_list":["post-223","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-apache","category-information-technology","category-linux","category-redhat"],"_links":{"self":[{"href":"https:\/\/muse.oneshot.in\/index.php?rest_route=\/wp\/v2\/posts\/223","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/muse.oneshot.in\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/muse.oneshot.in\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/muse.oneshot.in\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/muse.oneshot.in\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=223"}],"version-history":[{"count":1,"href":"https:\/\/muse.oneshot.in\/index.php?rest_route=\/wp\/v2\/posts\/223\/revisions"}],"predecessor-version":[{"id":224,"href":"https:\/\/muse.oneshot.in\/index.php?rest_route=\/wp\/v2\/posts\/223\/revisions\/224"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/muse.oneshot.in\/index.php?rest_route=\/wp\/v2\/media\/225"}],"wp:attachment":[{"href":"https:\/\/muse.oneshot.in\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=223"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/muse.oneshot.in\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=223"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/muse.oneshot.in\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=223"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}