📜  ubuntu install jre - Shell-Bash (1)

📅  最后修改于: 2023-12-03 14:48:06.639000             🧑  作者: Mango

Ubuntu Install JRE

If you're running Ubuntu and need to install the Java Runtime Environment (JRE), you'll be happy to know that it's a quick and easy process. In this guide, we'll walk you through the steps.

Step 1: Update package list

Before we can install the JRE, we need to update our package list to ensure we have the latest available packages.

Open a terminal window (Ctrl+Alt+T) and run the following command:

sudo apt update
Step 2: Install the JRE

Now that we're up to date, we can install the JRE using the following command:

sudo apt install default-jre

This will install the default JRE version that's currently available in the Ubuntu package repository.

Step 3: Verify the installation

Once the installation is complete, you can verify that the JRE is installed and working by running the following command:

java -version

This will display the version of the JRE that's currently installed.

Conclusion

That's it! You now have the JRE installed on your Ubuntu system. If you need a newer or specific version of the JRE, you can check the Ubuntu package repository or download and install it manually. But for most users, the default JRE provided by Ubuntu should work just fine.

sudo apt update
sudo apt install default-jre
java -version