{"id":4628,"date":"2019-11-13T20:51:55","date_gmt":"2019-11-13T17:51:55","guid":{"rendered":"https:\/\/kifarunix.com\/?p=4628"},"modified":"2024-03-12T23:18:10","modified_gmt":"2024-03-12T20:18:10","slug":"install-oracle-java-openjdk-13-on-centos-8","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/install-oracle-java-openjdk-13-on-centos-8\/","title":{"rendered":"Install Oracle Java (OpenJDK) 13 on CentOS 8"},"content":{"rendered":"\n<p>Follow through this guide to learn how to install Oracle Java (OpenJDK) 13 on CentOS 8. <a rel=\"noreferrer noopener\" aria-label=\"JDK 13 (opens in a new tab)\" href=\"https:\/\/openjdk.java.net\/projects\/jdk\/13\/\" target=\"_blank\">JDK 13<\/a> is an open-source implementation of version&nbsp;13 of the Java&nbsp;SE Platform.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Installing Java (OpenJDK) 13 on CentOS 8<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Download Oracle Java (OpenJDK) 13 RPM binary<\/h3>\n\n\n\n<p>Navigate to Official Oracle Java 13&nbsp;<a rel=\"noreferrer noopener\" aria-label=\"downloads page (opens in a new tab)\" href=\"https:\/\/www.oracle.com\/technetwork\/java\/javase\/downloads\/jdk13-downloads-5672538.html\" target=\"_blank\">downloads page<\/a>&nbsp;and download the latest Java 13 RPM binary. You can simply get the link and use wget to download it.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>wget --no-check-certificate -c --header \"Cookie: oraclelicense=accept-securebackup-cookie\" https:\/\/download.oracle.com\/otn-pub\/java\/jdk\/13.0.1+9\/cec27d702aa74d5a8630c65ae61e4305\/jdk-13.0.1_linux-x64_bin.rpm<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Install Java 13 on CentOS 8<\/h3>\n\n\n\n<p>Once you get the RPM binary, you can install it by executing the command below;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>dnf localinstall jdk-13.0.1_linux-x64_bin.rpm<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>Dependencies resolved.\n=======================================================================================================================================================\n Package                            Arch                           Version                                  Repository                            Size\n=======================================================================================================================================================\nInstalling:\n jdk-13.0.1                         x86_64                         2000:13.0.1-ga                           @commandline                         163 M\n\nTransaction Summary\n=======================================================================================================================================================\nInstall  1 Package\n\nTotal size: 163 M\nInstalled size: 308 M\nIs this ok [y\/N]: y\nDownloading Packages:\nRunning transaction check\nTransaction check succeeded.\nRunning transaction test\nTransaction test succeeded.\nRunning transaction\n  Preparing        :                                                                                                                               1\/1 \n  Installing       : jdk-13.0.1-2000:13.0.1-ga.x86_64                                                                                              1\/1 \n  Running scriptlet: jdk-13.0.1-2000:13.0.1-ga.x86_64                                                                                              1\/1 \n  Verifying        : jdk-13.0.1-2000:13.0.1-ga.x86_64                                                                                              1\/1 \n\nInstalled:\n  jdk-13.0.1-2000:13.0.1-ga.x86_64                                                                                                                     \n\nComplete!\n<\/code><\/pre>\n\n\n\n<p>Once the installation is done, you should be having the Java files in their right directories.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Verify Java 13 installation<\/h3>\n\n\n\n<p>You can run&nbsp;<strong>java \u2013version<\/strong>&nbsp;command to check your Oracle Java version.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>java --version<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>java 13.0.1 2019-10-15\nJava(TM) SE Runtime Environment (build 13.0.1+9)\nJava HotSpot(TM) 64-Bit Server VM (build 13.0.1+9, mixed mode, sharing)<\/code><\/pre>\n\n\n\n<p>If you have other Java versions installed, you can run the command below to make Java 13 the default Java version.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>alternatives --config java<\/code><\/pre>\n\n\n\n<p>For example, the output below shows that there is only one Java version installed. If there were other versions, you would see them numbered and you would select specific number of a version to make it the default.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>There is 1 program that provides 'java'.\n\n  Selection    Command\n-----------------------------------------------\n*+ 1           \/usr\/java\/jdk-13.0.1\/bin\/java\n\nEnter to keep the current selection[+], or type selection number: <strong>ENTER<\/strong><\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Create Java Environment Variable<\/h3>\n\n\n\n<p>To create Java environment variable, edit the&nbsp;<strong>\/etc\/environment<\/strong>&nbsp;file and add the line below;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>echo 'JAVA_HOME=\"\/usr\/java\/jdk-13.0.1\"' &gt;&gt; \/etc\/environment<\/code><\/pre>\n\n\n\n<p>Source the&nbsp;<strong>\/etc\/environment<\/strong>&nbsp;file to reload the environment variables.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>source \/etc\/environment<\/code><\/pre>\n\n\n\n<p>Verify the environment variable setting.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>echo $JAVA_HOME<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>\/usr\/java\/jdk-13.0.1<\/code><\/pre>\n\n\n\n<p>That is all about how install Java 13 on CentOS 8. Enjoy coding.<\/p>\n\n\n\n<p>You can also check our other guide on installing Oracle Java by following the links below;<\/p>\n\n\n\n<p><a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/kifarunix.com\/install-oracle-java-12-on-debian-10\/\" target=\"_blank\">Install Oracle Java 12 on Debian 10<\/a><\/p>\n\n\n\n<p><a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/kifarunix.com\/install-java-11-on-debian-9-8-ubuntu-18-04\/\" target=\"_blank\">Install Java 11 on Debian 9.8\/Ubuntu 18.04<\/a><\/p>\n\n\n\n<p><a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/kifarunix.com\/install-oracle-java-11-on-fedora-29-centos-7\/\" target=\"_blank\">Install Oracle Java 11 on Fedora 29\/CentOS 7<\/a><\/p>\n\n\n\n<p><a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/kifarunix.com\/install-oracle-java-12-on-centos-7-fedora-29\/\" target=\"_blank\">Install Oracle Java 12 on CentOS 7\/Fedora 29<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/how-to-manually-install-oracle-java-12-on-debian-9-8-ubuntu-18-04\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">How to Manually Install Oracle Java 12 on Debian 9.8\/Ubuntu 18.04<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Follow through this guide to learn how to install Oracle Java (OpenJDK) 13 on CentOS 8. JDK 13 is an open-source implementation of version&nbsp;13 of<\/p>\n","protected":false},"author":1,"featured_media":10534,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"footnotes":""},"categories":[121,795],"tags":[1142,1195,1196,1197],"class_list":["post-4628","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-howtos","category-java","tag-centos-8","tag-java-13","tag-openjdk-13","tag-oracle-java-on-centos-8","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-50","resize-featured-image"],"_links":{"self":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/4628"}],"collection":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/comments?post=4628"}],"version-history":[{"count":3,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/4628\/revisions"}],"predecessor-version":[{"id":21263,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/4628\/revisions\/21263"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media\/10534"}],"wp:attachment":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media?parent=4628"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/categories?post=4628"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/tags?post=4628"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}