In this tutorial, you'll learn how to upgrade OpenJDK 11 to OpenJDK 17 on Rocky Linux 9.5. OpenJDK 17 is a long-term support version ideal for modern Java development, and this video will guide you through installation, configuration, and testing with a sample Java program. ✅
✔️ Check and upgrade your Java version on Rocky Linux
✔️ Set JAVA_HOME and configure your PATH
✔️ Test OpenJDK 17 with a simple Java program
By the end, you’ll have OpenJDK 17 installed and working seamlessly on your system. Let’s get started!
🔥 Subscribe for more tutorials on Linux, Java, DevOps, and system administration!
📚 Commands Used in This Video:
Check current Java version
java -version
javac -version
Install OpenJDK 17
sudo dnf install java-17-openjdk java-17-openjdk-devel -y
Configure alternatives
sudo alternatives --config java
sudo alternatives --config javac
Get Java installation path
readlink -f $(which java)
🛠️ Prerequisites:
Rocky Linux 9.5 installed on VirtualBox.
Basic knowledge of Linux terminal commands.
📚 Chapters
0:01 - 🎉 Introduction to the Tutorial - Brief overview of upgrading OpenJDK 11 to OpenJDK 17 on Rocky Linux 9.5 in VirtualBox.
0:13 - 🖥️ Rocky Linux Setup Overview - Explanation of the virtual machine setup with Rocky Linux 9.5 and VirtualBox.
0:40 - 🛠️ SSH Access Setup - Connecting to the Rocky Linux VM via SSH using MobaXterm.
1:00 - 🚀 Prerequisites for Installation - Listing the prerequisites before starting the Java upgrade process.
1:44 - 🔍 Check Current Java Version - Checking the current Java version (OpenJDK 11) and its compatibility with the new version.
2:36 - 🔧 Installing OpenJDK 17 - Using DNF package manager to install OpenJDK 17 and necessary tools on Rocky Linux.
4:44 - ⚙️ Update Default Java Version - Setting OpenJDK 17 as the default Java version using the alternatives command.
5:09 - 🔄 Configure Java Compiler - Setting the Java compiler to version 17 and verifying it.
6:05 - 📍 Find Java Installation Path - Finding the installation path of Java and setting the JAVA_HOME environment variable.
7:01 - 📝 Set JAVA_HOME - Adding the JAVA_HOME path to the .bashrc file and updating it.
8:59 - 🔄 Apply Configuration Changes - Reloading the configuration using source command to apply JAVA_HOME and PATH updates.
9:53 - 📂 Verify Java Installation - Verifying that Java is correctly installed and working.
10:10 - 👨💻 Create Java "Hello World" Program - Writing and saving a simple Java program to test the new Java version.
11:30 - 🏃♂️ Run Java Program - Compiling and running the Java program to confirm OpenJDK 17 is working.
11:53 - ✅ Successful Upgrade - Recap of the successful OpenJDK 11 to OpenJDK 17 upgrade and testing the Java setup.
12:01 - 👋 Conclusion - Wrapping up the tutorial and thanking viewers for watching.
#OpenJDK17 #RockyLinux #JavaUpgrade #LinuxTutorial #TechOps