{"id":33491,"date":"2021-03-18T14:31:20","date_gmt":"2021-03-18T14:31:20","guid":{"rendered":"https:\/\/ubuntuhandbook.org\/?p=33491"},"modified":"2021-09-15T13:33:49","modified_gmt":"2021-09-15T13:33:49","slug":"oracle-java-16-released-install-ubuntu-20-04","status":"publish","type":"post","link":"https:\/\/ubuntuhandbook.org\/index.php\/2021\/03\/oracle-java-16-released-install-ubuntu-20-04\/","title":{"rendered":"Oracle Java 16 Released, How to Install it in Ubuntu 20.04, 18.04, 20.10"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2014\/09\/java-icon.png\" alt=\"\" width=\"250\" height=\"250\" class=\"alignleft size-full wp-image-4004\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2014\/09\/java-icon.png 250w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2014\/09\/java-icon-150x150.png 150w\" sizes=\"auto, (max-width: 250px) 100vw, 250px\" \/><\/p>\n<p>Oracle Java 16 was announced as a short release with 6-month support. Here&#8217;s how to install it in Ubuntu 14.04, Ubuntu 16.04, Ubuntu 18.04, Ubuntu 20.04, Ubuntu 20.10 via PPA. <\/p>\n<p><b>UPDATE: Oracle Java 17 has been released as the new LTS (Long Term Support Release). This tutorial also works for the new release!<\/b><\/p>\n<p>New features in the release include:<\/p>\n<ul>\n<li>Vector API (Incubator)<\/li>\n<li>Enable C++14 Language Features<\/li>\n<li>Migrate from Mercurial to Git<\/li>\n<li>Migrate to GitHub<\/li>\n<li>ZGC: Concurrent Thread-Stack Processing<\/li>\n<li>Unix-Domain Socket Channels<\/li>\n<li>Alpine Linux Port<\/li>\n<li>Elastic Metaspace<\/li>\n<li>Windows\/AArch64 Port<\/li>\n<li>Foreign Linker API (Incubator)<\/li>\n<li>Warnings for Value-Based Classes<\/li>\n<li>Packaging Tool<\/li>\n<li>Foreign-Memory Access API (Third Incubator)<\/li>\n<li>Pattern Matching for instanceof<\/li>\n<li>Records<\/li>\n<li>Strongly Encapsulate JDK Internals by Default<\/li>\n<li>Sealed Classes (Second Preview)<\/li>\n<\/ul>\n<p>The <a href=\"https:\/\/launchpad.net\/~linuxuprising\/+archive\/ubuntu\/java\" rel=\"noopener\" target=\"_blank\">\u201cLinux Uprising\u201d team ppa<\/a> has made the installer script, which automatically downloads and installs Oracle JDK 16 package, and sets Java 16 as the default Java version (setting JAVA_HOME, etc.) on 64-bit Ubuntu based system.<\/p>\n<p><b>1.)<\/b> Open <u>terminal<\/u> and run command to add the PPA:<\/p>\n<pre style=\"border:none;\">sudo add-apt-repository ppa:linuxuprising\/java<\/pre>\n<p><i>Type user password (no asterisk feedback) when it asks and hit Enter to continue.<\/i><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/09\/java-ppa-focal.png\" alt=\"\" width=\"600\" height=\"123\" class=\"aligncenter size-full wp-image-32750\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/09\/java-ppa-focal.png 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/09\/java-ppa-focal-450x92.png 450w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p><b>2.)<\/b> After adding PPA, refresh system package cache and install the script:<\/p>\n<pre style=\"border:none;\">sudo apt update\r\n\r\nsudo apt install oracle-java16-installer<\/pre>\n<p><b>For Java JDK 17, replace the package name so the command will be:<\/b><\/p>\n<pre style=\"border:none;\">udo apt install oracle-java17-installer<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/03\/apt-java16.png\" alt=\"\" width=\"600\" height=\"310\" class=\"aligncenter size-full wp-image-33492\" \/><\/p>\n<p>Once the package is installed, you have to accept the license (<i>press <b>Tab<\/b> to highlight<\/i>) before starting the download process.<\/p>\n<p>And after installed Oracle Java 16, check via <code>java --version<\/code> command:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/03\/java16-version.png\" alt=\"\" width=\"600\" height=\"151\" class=\"aligncenter size-full wp-image-33495\" \/><\/p>\n<p>(<b>Optional<\/b>) To uninstall the PPA repository, run command in terminal:<\/p>\n<pre style=\"border:none;\">sudo add-apt-repository --remove ppa:linuxuprising\/java<\/pre>\n<p>And remove Oracle Java 16 if you want by running command:<\/p>\n<pre style=\"border:none;\">sudo apt-get remove oracle-java16-installer<\/pre>","protected":false},"excerpt":{"rendered":"<p>Oracle Java 16 was announced as a short release with 6-month support. Here&#8217;s how to install it in Ubuntu 14.04, Ubuntu 16.04, Ubuntu 18.04, Ubuntu 20.04, Ubuntu 20.10 via PPA. UPDATE: Oracle Java 17 has been released as the new LTS (Long Term Support Release). This tutorial also works for the new release! New features [&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":[1540],"class_list":["post-33491","post","type-post","status-publish","format-standard","hentry","category-howtos","tag-oracle-java"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/33491","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=33491"}],"version-history":[{"count":0,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/33491\/revisions"}],"wp:attachment":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/media?parent=33491"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/categories?post=33491"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/tags?post=33491"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}