{"id":10073,"date":"2021-09-20T13:39:10","date_gmt":"2021-09-20T13:39:10","guid":{"rendered":"https:\/\/linuxways.net\/?p=10073"},"modified":"2021-09-20T13:39:10","modified_gmt":"2021-09-20T13:39:10","slug":"how-to-install-oracle-java-16-on-ubuntu-18-04-20-04","status":"publish","type":"post","link":"https:\/\/linuxways.net\/de\/ubuntu\/how-to-install-oracle-java-16-on-ubuntu-18-04-20-04\/","title":{"rendered":"How to Install Oracle Java 16 On Ubuntu 18.04 \/ 20.04"},"content":{"rendered":"<p><a href=\"https:\/\/www.oracle.com\/news\/announcement\/oracle-announces-java-16-031621.html\">Oracle Java 16 was released on 16 March 2021<\/a> and will provide 17 enhancements that will go a long way in boosting developer productivity. The Java 16 release is a result of many weeks of extensive collaboration between the worldwide Java developer community and Oracle engineers to deliver a robust development platform.<\/p>\n<p>At a glance, Java 16 provides the following new enhancements:<\/p>\n<ol>\n<li>New language improvements<\/li>\n<li>New tools to boost developer productivity<\/li>\n<li>Better memory management to enhance performance<\/li>\n<li>Improved networking to boost developer productivity &amp; flexibility<\/li>\n<li>New ports to provide additional support for Java on multiple platforms.<\/li>\n<\/ol>\n<p>In this guide, we cover how to install Oracle Java 16 on Ubuntu 20.04.<\/p>\n<h2><strong>Step 1: Update the system and install dependencies<\/strong><\/h2>\n<p>We will begin by updating the package index as shown.<\/p>\n<pre><strong>$ sudo apt update<\/strong><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"840\" height=\"151\" class=\"wp-image-10074\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-262.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-262.png 840w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-262-300x54.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-262-768x138.png 768w\" sizes=\"auto, (max-width: 840px) 100vw, 840px\" \/><\/p>\n<p>Next, install the dependencies required during the installation as shown.<\/p>\n<pre><strong>$ sudo apt install software-properties-common<\/strong><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"840\" height=\"337\" class=\"wp-image-10075\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-263.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-263.png 840w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-263-300x120.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-263-768x308.png 768w\" sizes=\"auto, (max-width: 840px) 100vw, 840px\" \/><\/p>\n<h2><strong>Step 2: Add Oracle Java PPA repository<\/strong><\/h2>\n<p>The <a href=\"https:\/\/launchpad.net\/~linuxuprising\/+archive\/ubuntu\/java\">Linux Uprising PPA<\/a> provides an automated script and packages that downloads and installs Oracle Java.These packages are are part of the WebUpd8 Oracle Java PPA packages. Note, however, that due to licensing, Java Binaries are not included in this PPA.<\/p>\n<p>To add the Linux Uprising PPA, run the command shown. When prompted hit ENTER .<\/p>\n<pre><strong>$ sudo add-apt-repository ppa:linuxuprising\/java<\/strong><\/pre>\n<p><strong><img loading=\"lazy\" decoding=\"async\" width=\"903\" height=\"228\" class=\"wp-image-10076\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-264.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-264.png 903w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-264-300x76.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-264-768x194.png 768w\" sizes=\"auto, (max-width: 903px) 100vw, 903px\" \/><\/strong><\/p>\n<p>Next, Append the Linux Uprising PPA to the sources list file. But first, switch to root user.<\/p>\n<pre><strong>$ sudo su<\/strong><\/pre>\n<p>Then add the PPA as provided.<\/p>\n<pre><strong>$ echo \"deb http:\/\/ppa.launchpad.net\/linuxuprising\/java\/ubuntu focal main\" | tee \/etc\/apt\/sources.list.d\/linuxuprising-java.list<\/strong><\/pre>\n<p>Next, import the GPG signing key.<\/p>\n<pre><strong>$ apt-key adv --keyserver hkp:\/\/keyserver.ubuntu.com:80 --recv-keys 73C3DB2A<\/strong><\/pre>\n<p><strong><img loading=\"lazy\" decoding=\"async\" width=\"906\" height=\"196\" class=\"wp-image-10077\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-265.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-265.png 906w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-265-300x65.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-265-768x166.png 768w\" sizes=\"auto, (max-width: 906px) 100vw, 906px\" \/><\/strong><\/p>\n<p>Thereafter, Update the package lists to synchronize with the Linux Uprising PPA.<\/p>\n<pre><strong>$ sudo apt update<\/strong><\/pre>\n<p><strong><img loading=\"lazy\" decoding=\"async\" width=\"806\" height=\"303\" class=\"wp-image-10078\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-266.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-266.png 806w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-266-300x113.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-266-768x289.png 768w\" sizes=\"auto, (max-width: 806px) 100vw, 806px\" \/><\/strong><\/p>\n<h2><strong>Step 3: Install Oracle Java 16 on Ubuntu<\/strong><\/h2>\n<p>Finally, install Oracle Java 16 using the command:<\/p>\n<pre><strong>$ sudo apt install oracle-java16-installer<\/strong><\/pre>\n<p><strong><img loading=\"lazy\" decoding=\"async\" width=\"898\" height=\"349\" class=\"wp-image-10079\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-267.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-267.png 898w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-267-300x117.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-267-768x298.png 768w\" sizes=\"auto, (max-width: 898px) 100vw, 898px\" \/><\/strong><\/p>\n<p>Read the License terms and press TAB to highlight the \u2018Ok\u2019 button and press ENTER.<\/p>\n<p><strong><img loading=\"lazy\" decoding=\"async\" width=\"895\" height=\"614\" class=\"wp-image-10080\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-268.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-268.png 895w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-268-300x206.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-268-768x527.png 768w\" sizes=\"auto, (max-width: 895px) 100vw, 895px\" \/><\/strong><\/p>\n<p>Next, select \u2018<strong>Yes<\/strong>\u2019 to accept the license agreement.<\/p>\n<p><strong><img loading=\"lazy\" decoding=\"async\" width=\"904\" height=\"498\" class=\"wp-image-10081\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-269.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-269.png 904w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-269-300x165.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-269-768x423.png 768w\" sizes=\"auto, (max-width: 904px) 100vw, 904px\" \/><\/strong><\/p>\n<p>The installation of Oracle Java will continue and finally, come to a close. To verify the version of Java installed, run the command:<\/p>\n<pre><strong>$ java -version<\/strong><\/pre>\n<p>OR<\/p>\n<pre><strong>$ javac -version<\/strong><\/pre>\n<p><strong><img loading=\"lazy\" decoding=\"async\" width=\"715\" height=\"209\" class=\"wp-image-10082\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-270.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-270.png 715w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/09\/word-image-270-300x88.png 300w\" sizes=\"auto, (max-width: 715px) 100vw, 715px\" \/><\/strong><\/p>\n<p>If you got this far, you have successfully installed Oracle Java 16 on Ubuntu 20.04. You can now proceed and start developing your Java applications with the enhanced features provided with the latest Java 16 version.<\/p>","protected":false},"excerpt":{"rendered":"<p>Oracle Java 16 was released on 16 March 2021 and will provide 17 enhancements that will go a long way in boosting developer productivity. The Java 16 release&hellip;<\/p>","protected":false},"author":1,"featured_media":10305,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[540,100],"class_list":["post-10073","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ubuntu","tag-oracle-java","tag-ubuntu-20-04"],"_links":{"self":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/10073","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/comments?post=10073"}],"version-history":[{"count":0,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/10073\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media\/10305"}],"wp:attachment":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media?parent=10073"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/categories?post=10073"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/tags?post=10073"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}