Recently Java 15 has been released with interesting new features in the accounting field and introducing many security patches. In spite of this, it can now be installed in Linux either as compiled packages or by downloading the binaries. Well, in this post, I will show you how to install Java 15 on OpenSUSE 15.2 / 15.1.
One of the biggest strengths of OpenSUSE is that it has a wide range of packages and programs that can be installed. On the other hand, the OpenSUSE project has many community and official repositories that extend even more the functionality of the distribution.
OpenJDK or Oracle Java
Since Java version 11, the license has changed and become a little more restrictive for commercial purposes. However, OpenJDK continues to run alongside the commercial version that includes professional support.
The above situation opens a small controversy about which implementation to use. And the answer depends on each developer however, with OpenJDK you will not have license problems and is ideal for testing features and educational projects.
Well, for this tutorial I will choose OpenJDK. Do not worry it is Java but open source.
Let’s go for it.
Install Java 15 on OpenSUSE 15.2
Once you have a terminal session open, it is necessary to completely upgrade your system. To do this, run the following command:
:~$ sudo zypper up
Once the system upgrade is complete, we can continue.
Java 15 packages can be found in an OpenSUSE factory repository. This repository has proven to be quite stable and we will be able to use it without problems.
So to add this repository run it:
:~$ sudo zypper ar http://download.opensuse.org/repositories/Java:/Factory/openSUSE_Leap_15.2/ java
Now that the repository has been added, it needs to be reprioritized so that it does not get into trouble with the rest:
:~$ sudo zypper mr -p 70 java Repository 'java' priority has been set to 70.
Then, refresh all the repositories to load the newly added one. When you first use this repository, you will be asked to accept the GPG key for it.
:~$ sudo zypper refresh Retrieving repository 'java' metadata --------------------------------------------------------------------------------------------------------------------------------[|] New repository or package signing key received: Repository: java Key Name: Java OBS Project [email protected] Key Fingerprint: 97119219 72E27C87 BBC1BA89 E38C29BC 4276E0B9 Key Created: Mon 18 Jun 2018 09:42:22 AM -04 Key Expires: Wed 26 Aug 2020 09:42:22 AM -04 Rpm Name: gpg-pubkey-4276e0b9-5b27b6be Do you want to reject the key, trust temporarily, or trust always? r/t/a/?: a Retrieving repository 'java' metadata ……………………………………………………………………………………………………………..[done] Building repository 'java' cache ………………………………………………………………………………………………………………….[done] Repository 'Non-OSS Repository' is up to date. Repository 'Main Repository' is up to date. Retrieving repository 'Main Update Repository' metadata ……………………………………………………………………………………………..[done] Building repository 'Main Update Repository' cache ………………………………………………………………………………………………….[done] Retrieving repository 'Update Repository (Non-Oss)' metadata …………………………………………………………………………………………[done] Building repository 'Update Repository (Non-Oss)' cache ……………………………………………………………………………………………..[done] All repositories have been refreshed.
Now, you can install Java 15 on OpenSUSE 15.2
:~$ sudo zypper in java-15-openjdk
Finally, check the installed version
:~$ java --version openjdk 15-internal 2020-09-15 OpenJDK Runtime Environment (build 15-internal+33-suse-lp152.14.15-x8664) OpenJDK 64-Bit Server VM (build 15-internal+33-suse-lp152.14.15-x8664, mixed mode)
So, enjoy it.
Conclusion
Java 15 is an improved version of a great programming language. This makes many developers attentive to its evolution with a view to a new LTS version. Now you know how to install it in OpenSUSE 15.2 which is a distribution quite focused on newcomers but also professional developers. So, you know how to install Java 15 on OpenSUSE 15.2
Please share this post and join our Telegram channel.
Thanks for reading the post.