Install Java Yum Instant
sudo yum install java-17-openjdk-devel On many systems, you can install the default Java set by the distribution:
sudo yum search openjdk Or search for a specific version:
sudo yum remove java-11-openjdk-headless Or remove all OpenJDK packages: install java yum
sudo yum install oraclelinux-release-el8 sudo yum install java-11-oraclejdk-devel For other distributions, download the RPM from Oracle JDK Downloads and install:
openjdk version "11.0.22" 2024-01-16 LTS OpenJDK Runtime Environment (Red Hat build 11.0.22+7-LTS) OpenJDK 64-Bit Server VM (Red Hat build 11.0.22+7-LTS, mixed mode, sharing) Check compiler (if JDK installed): sudo yum install java-17-openjdk-devel On many systems, you
sudo yum remove '*openjdk*' Official Oracle Java RPMs are not in standard repos. Use the Oracle Linux repository or download manually.
java -version Sample output:
java -version If not installed, you’ll see command not found . List all Java-related packages:
