Recently, Oracle released a new version of Java, the well-known software platform that includes its development components and virtual machine. Inside the development kit, we have a new version of the virtual machine and an update of the libraries that compose it.
If at this point in the game, you don’t know what Java is, we can tell you that it is a High-Level, Object Oriented, Multi-Purpose Programming Language. It can be used in PC, mobile and other technologies.It is highly popular and surely, Java is present in the construction of the applications we use every day.
Downloading the necessary packages
The best way to get java is to go to the Oracle downloads section.
In the image we can see that there are 3 downloads available, one that is the JDK and the other that is JRE. So, which one should we download? Only JDK and JRE.
We will briefly explain, the JDK is the Java Development Kit, that is, the package provides all the necessary tools to develop Java applications. As stated above, these applications can be focused on the desktop, the web or mobile phones.
In contrast to the JRE, are the set of utilities that are required to run Java applications, therefore, in this package is the Java Virtual Machine. The JVM is the program that executes the Java code previously compiled (bytecode) while the standard class libraries are the ones that implement the Java API.
Then we proceed to download both packages. Let’s get the JDK first. In the following image we must choose the .rpm package that is suitable for OpenSUSE, it is also suitable for Fedora. Once the license agreement is accepted we can start the download.
In the following image we must choose the .rpm package that is suitable for OpenSUSE, it is also suitable for Fedora. Once the license agreement is accepted we can start the download.
We’re doing the same thing with the JRE.
Installing the downloaded packages
An OpenSUSE installation contains the community version of Java that we must remove in order to use the official version without problems.
sudo zypper remove java-10-openjdk-headless java-10-openjdk
Installing .rpm packages is really easy, and we can do it from the terminal to make the process very fast.
sudo rpm -i file_path.rpm
In my case:
sudo rpm -i Downloads/jdk-10.0.1_linux-x64_bin.rpm
sudo updates-alternatives –config java
Finally, we test the installation result with the commands:
And as we can see, the result for the terminal is the installed version, indicating that the process was correct.
Installing Java in a GNU/LINUX distribution is not as complicated as it used to be, thanks to the availability of packages in its download section. It is a great programming language of high level, quite well known and with a lot of support behind it.