{"id":14570,"date":"2022-02-01T08:50:37","date_gmt":"2022-02-01T08:50:37","guid":{"rendered":"https:\/\/linuxways.net\/?p=14570"},"modified":"2022-02-01T08:50:37","modified_gmt":"2022-02-01T08:50:37","slug":"how-to-install-java-on-opensuse","status":"publish","type":"post","link":"https:\/\/linuxways.net\/de\/opensuse\/how-to-install-java-on-opensuse\/","title":{"rendered":"How to Install Java on openSUSE"},"content":{"rendered":"<p>Java is a fast, secure and one of the most popular multi-purpose programming language and computing platform. Java has lot of advantages as compared to other programming languages, making it a good choice for almost any programming task. There are a number of applications and some websites that do not function without Java.<\/p>\n<p>In this tutorial, we will show you how to install Java SE (Standard Edition) on the openSUSE system through two different methods.<\/p>\n<ul>\n<li>Installation of Java through Google Chrome Repository<\/li>\n<li>Installation of Java through RPM Package<\/li>\n<\/ul>\n<p><strong>Note<\/strong>: We have tested the methods described here on <strong>openSUSE Leap 15.3<\/strong>.<\/p>\n<h2>Method#1 Installing Java Using RPM<\/h2>\n<p>This method explains the installation of Java on openSUSE using the RPM package available at the Oracle website.<\/p>\n<p>1. Visit the Oracle <a href=\"https:\/\/www.oracle.com\/java\/technologies\/downloads\/\">Downloads<\/a> page and download JDK x64 Compressed Archive .rpm package. There are two Java packages: Java Development Kit (JDK) and Java Runtime Environment (JRE). The JDK includes JRE. When you will install Oracle JDK, JRE will also be installed alongside it.<\/p>\n<p>On the other hand, you can use the command below to download Oracle JDK:<\/p>\n<pre>$ wget https:\/\/download.oracle.com\/java\/17\/latest\/jdk-17_linux-x64_bin.rpm<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1198\" height=\"255\" class=\"wp-image-14571\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-689.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-689.png 1198w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-689-300x64.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-689-1024x218.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-689-768x163.png 768w\" sizes=\"auto, (max-width: 1198px) 100vw, 1198px\" \/><\/p>\n<p>2. Now to install Java, run the command below:<\/p>\n<pre>$ sudo rpm -ivh jdk-17_linux-x64_bin.rpm<\/pre>\n<p>This command will install JDK 17 on your openSUSE machine.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1027\" height=\"136\" class=\"wp-image-14572\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-690.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-690.png 1027w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-690-300x40.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-690-1024x136.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-690-768x102.png 768w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-690-1020x136.png 1020w\" sizes=\"auto, (max-width: 1027px) 100vw, 1027px\" \/><\/p>\n<p>3. To verify the installation of JDK, run the command below:<\/p>\n<pre>$ java --version<\/pre>\n<p>The output below verifies that Java version 17 has been installed on our openSUSE machine.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"791\" height=\"97\" class=\"wp-image-14573\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-691.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-691.png 791w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-691-300x37.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-691-768x94.png 768w\" sizes=\"auto, (max-width: 791px) 100vw, 791px\" \/><\/p>\n<h2>Method#2 Installing Java on openSUSE Manually<\/h2>\n<p>This method explains the installation of Java manually on openSUSE using the tar.gz package available at the Oracle website.<\/p>\n<p>1. Visit the Oracle <a href=\"https:\/\/www.oracle.com\/java\/technologies\/downloads\/\">Downloads<\/a> page and download JDK x64 Compressed Archive tar.gz package. There are two Java packages: Java Development Kit (JDK) and Java Runtime Environment (JRE). The JDK includes JRE. When you will install Oracle JDK, JRE will also be installed alongside it.<\/p>\n<p>On the other hand, you can use the command below to download Oracle JDK:<\/p>\n<pre>$ wget https:\/\/download.oracle.com\/java\/17\/latest\/jdk-17_linux-x64_bin.tar.gz<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1055\" height=\"258\" class=\"wp-image-14574\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-692.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-692.png 1055w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-692-300x73.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-692-1024x250.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-692-768x188.png 768w\" sizes=\"auto, (max-width: 1055px) 100vw, 1055px\" \/><\/p>\n<p>The downloaded file is the archive file in tar.gz format.<\/p>\n<p>2. Extract the downloaded archive through the command below. Before extracting the archive, ensure that you are in the same directory that includes the archive file.<\/p>\n<pre>$ tar -xvf jdk-17_linux-x64_bin.tar.gz<\/pre>\n<p>3. After extracting the archive, run the command below to move it to the \/opt directory:<\/p>\n<pre>$ sudo mv jdk-17 \/opt\/jdk17<\/pre>\n<p>4. Now set the JAVA_HOME environment variable through the commands below:<\/p>\n<pre>$ export JAVA_HOME=\/opt\/jdk17<\/pre>\n<pre>$ export PATH=$JAVA_HOME\/bin:$PATH<\/pre>\n<p>Now the installation of Java has been completed.<\/p>\n<p>5. You can verify the installation of Java through the command below:<\/p>\n<pre>$ java --version<\/pre>\n<p>The output below verifies that Java version 17 has been installed on our openSUSE machine.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"790\" height=\"98\" class=\"wp-image-14575\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-693.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-693.png 790w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-693-300x37.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-693-768x95.png 768w\" sizes=\"auto, (max-width: 790px) 100vw, 790px\" \/><\/p>\n<p>This tutorial covered the installation of Java on openSUSE through two different methods. If you need to install Java on other Linux distributions, visit how to install Java on <a href=\"https:\/\/linuxways.net\/de\/ubuntu\/how-to-install-java-on-ubuntu-20-04-lts\/\">Ubuntu<\/a> and <a href=\"https:\/\/linuxways.net\/de\/debian\/how-to-install-java-17-lts-jdk-17-on-debian-11\/\">Debian<\/a>.<\/p>","protected":false},"excerpt":{"rendered":"<p>Java is a fast, secure and one of the most popular multi-purpose programming language and computing platform. Java has lot of advantages as compared to other programming languages,&hellip;<\/p>","protected":false},"author":1,"featured_media":14668,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[83],"tags":[331,858],"class_list":["post-14570","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-opensuse","tag-java","tag-opensuse"],"_links":{"self":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/14570","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=14570"}],"version-history":[{"count":0,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/14570\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media\/14668"}],"wp:attachment":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media?parent=14570"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/categories?post=14570"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/tags?post=14570"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}