{"id":3047,"date":"2014-02-28T04:40:49","date_gmt":"2014-02-28T04:40:49","guid":{"rendered":"http:\/\/ubuntuhandbook.org\/?p=3047"},"modified":"2014-09-18T07:00:34","modified_gmt":"2014-09-18T07:00:34","slug":"install-oracle-java-6-7-or-8-ubuntu-14-04","status":"publish","type":"post","link":"https:\/\/ubuntuhandbook.org\/index.php\/2014\/02\/install-oracle-java-6-7-or-8-ubuntu-14-04\/","title":{"rendered":"Install Oracle Java 6, 7, or 8 in Ubuntu 14.04 Trusty"},"content":{"rendered":"<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2014\/02\/oracle_java_icons_logo.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2014\/02\/oracle_java_icons_logo.png\" alt=\"Oracle Java Ubuntu 14.04\" width=\"250\" height=\"188\" class=\"aligncenter size-full wp-image-3048\" \/><\/a><\/p>\n<p>This simple tutorial is going to show you how to easily install Oracle Java (JDK) 6, 7, or 8 in Ubuntu 14.04 Trusty Tahr via PPA.<\/p>\n<p>There&#8217;s a Launchpad PPA (Personal Package Archive) maintained by webupd8.org, a popular Ubuntu Linux blog, which provides the most recent <b>installers to automatically download and install Oracle Java JDK6 \/ JDK7 \/ JDK8 from oracle website.<\/b> Note there are no actual Java files in this PPA. <\/p>\n<p><b>To get started:<\/b><\/p>\n<p>Press <u>Ctrl+Alt+T<\/u> on your keyboard to open a terminal window. When it opens, copy and paste the command below and hit enter. Input your user password when prompts and it will add the PPA repository into your system.<\/p>\n<pre style=\"border:none;\">sudo add-apt-repository ppa:webupd8team\/java<\/pre>\n<p>After that, update package lists via:<\/p>\n<pre style=\"border:none;\">sudo apt-get update<\/pre>\n<p>To install Oracle Java 8, run:<\/p>\n<pre style=\"border:none;\">sudo apt-get install oracle-java8-installer<\/pre>\n<p>Change the number <b>8<\/b> to <b>6<\/b> (or <b>7<\/b>) in the code to install Java <b>6<\/b> (or <b>7<\/b>). <\/p>\n<p>While installation, you&#8217;ll be asked to agree the license and then the installer start downloading Java file from oracle website and install it on your system.<\/p>\n<p>To set the default Java, run:<\/p>\n<pre style=\"border:none;\">sudo apt-get install oracle-java8-set-default<\/pre>\n<p>Also change number 8 to the Java version you want.<\/p>\n<p>Finally check whether everyting is OK:<\/p>\n<pre style=\"border:none;\">java -version<\/pre>\n<p>It will output something like below:<\/p>\n<blockquote><p>java version &#8220;1.7.0_60&#8221;<br \/>\nJava(TM) SE Runtime Environment (build 1.7.0_60-b19)<br \/>\nJava HotSpot(TM) 64-Bit Server VM (build 24.60-b09, mixed mode)<\/p><\/blockquote>","protected":false},"excerpt":{"rendered":"<p>This simple tutorial is going to show you how to easily install Oracle Java (JDK) 6, 7, or 8 in Ubuntu 14.04 Trusty Tahr via PPA. There&#8217;s a Launchpad PPA (Personal Package Archive) maintained by webupd8.org, a popular Ubuntu Linux blog, which provides the most recent installers to automatically download and install Oracle Java JDK6 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[60,855],"class_list":["post-3047","post","type-post","status-publish","format-standard","hentry","category-howtos","tag-install-oracle-java-ubuntu","tag-ubuntu-14-04"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/3047","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/comments?post=3047"}],"version-history":[{"count":0,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/3047\/revisions"}],"wp:attachment":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/media?parent=3047"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/categories?post=3047"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/tags?post=3047"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}