Java Runtime Environment (JRE), commonly known as Java, is an essential application to run various software applications and programs on your Linux Ubuntu computer. Installing Java JRE on your Linux Ubuntu machine is necessary to ensure that you can run applications reliably, efficiently, and without any issues.

In this article, we will guide you on how to install Oracle Java JRE on your Linux Ubuntu machine easily.

Step 1: Check if Java is already installed

Before installing Java JRE, it’s essential to check if Java is already installed on your Ubuntu machine. To check, open the terminal and type the following command:

java -version

If Java is not installed, proceed to the next step. If it is installed, check the version installed to ensure it’s the most recent version.

Step 2: Download Java JRE

Go to Oracle’s official download page to download the latest Java JRE version for your Linux Ubuntu machine. You should download the “.tar.gz” package as it’s aimed at Linux.

Head to the website below and download the latest version of Oracle Java JRE that aligns with your system setup.

https://www.oracle.com/java/technologies/javase-jre8-downloads.html

Step 3: Extract the Java JRE archive

Once the package has downloaded, the next step is to extract the Java JRE archive. Open the terminal and navigate to the downloads directory and run the following commands to extract the archive.

cd Downloads/
tar zxvf jre-8u261-linux-x64.tar.gz

The “cd” command moves you to the Downloads directory, while the “tar” command extracts the archive.

Step 4: Move Java JRE archive to the /opt directory.

This step involves moving the extracted Java JRE archive to the “opt” directory. Run the following command:

sudo mv jre1.8.0_261 /opt/

The “sudo” command runs the command as the root user, which grants you full access to run it.

Step 5: Install Java JRE on Ubuntu.

Once the archive has been moved, the final step is to install Java JRE on your Linux Ubuntu machine. Use the command below to install Java JRE:

sudo update-alternatives –install “/usr/bin/java” “java” “/opt/jre1.8.0_261/bin/java” 1

This command creates a symbolic link to the Java executable file, placing it in the right path for use from anywhere.

Lastly, verify if the installation was successful, type the command below:

java -version

If you see similar output below, it means that Java JRE has been correctly installed on your Ubuntu machine.

java version “1.8.0_261”
Java(TM) SE Runtime Environment (build 1.8.0_261-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.261-b12, mixed mode)

Conclusion

Installing Java JRE on your Linux Ubuntu machine is not a complicated process. Follow the above steps to install Java JRE successfully and ensure you have the latest version. The latest Java JRE version adds additional features, performance optimizations, bug fixes, and security enhancements, which are essential in the day-to-day running of your machine.

Quest'articolo è stato scritto a titolo esclusivamente informativo e di divulgazione. Per esso non è possibile garantire che sia esente da errori o inesattezze, per cui l’amministratore di questo Sito non assume alcuna responsabilità come indicato nelle note legali pubblicate in Termini e Condizioni
Quanto è stato utile questo articolo?
0
Vota per primo questo articolo!