How to install Java 14 on OpenSUSE 15.1?

0
515

Recently Java 14 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 14 on OpenSUSE 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 14 on OpenSUSE 15.1

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 14 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.1/ java
Adding repository 'java' …………………………………………………………………………………………………………………………[done]
 Repository 'java' successfully added
 URI         : http://download.opensuse.org/repositories/Java:/Factory/openSUSE_Leap_15.1/
 Enabled     : Yes                                                                        
 GPG Check   : Yes                                                                        
 Autorefresh : No                                                                         
 Priority    : 99 (default priority)                                                      
 Repository priorities are without effect. All enabled repositories share the same priority.
1.- Adding the OpenSUSE repository to install Java 14
1.- Adding the OpenSUSE repository to install Java 14

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.
2.- Set a new priority for the repository
2.- Set a new priority for the repository

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.
3.- Refresh all system repositories
3.- Refresh all system repositories

Now, you can install Java 14 on OpenSUSE 15.1

:~$ sudo zypper in java-14-openjdk
Loading repository data…
 Reading installed packages…
 Resolving package dependencies…
 The following 11 NEW packages are going to be installed:
   java-14-openjdk java-14-openjdk-headless javapackages-tools libFLAC8 libgif7 libpcsclite1 libpulse0 libsndfile1 libspeex1 pcsc-lite timezone-java
 The following 2 recommended packages were automatically selected:
   pcsc-lite timezone-java
 11 new packages to install.
 Overall download size: 41,8 MiB. Already cached: 0 B. After the operation, additional 187,9 MiB will be used.
 Continue? y/n/v/…? shows all options: 
4.- Install Java 14 on OpenSUSE 15.1
4.- Install Java 14 on OpenSUSE 15.1

Finally, check the installed version

:~$ java --version
 openjdk 14 2020-03-17
 OpenJDK Runtime Environment (build 14+36-suse-lp151.5.1-x8664)
 OpenJDK 64-Bit Server VM (build 14+36-suse-lp151.5.1-x8664, mixed mode)
5.- Java version
5.- Java version

So, enjoy it.

Conclusion

Java 14 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.1 which is a distribution quite focused on newcomers but also professional developers.

Please share this post and join our Telegram channel.

LEAVE A REPLY

Please enter your comment!
Please enter your name here