To also remove configuration:
Expected output example (OpenJDK):
sudo yum remove java-17-openjdk-headless
sudo yum list installed | grep java
After running this command, yum will download and install Java 17 and its dependencies. Once the installation is complete, you can verify that Java 17 is installed by running:
: After installation, you might want to set Java 17 as the default Java version if your system has multiple Java versions installed. You can list installed Java versions with: