sudo yum install java-17-openjdk For compiling and running Java code:
yum list available | grep -i "openjdk-17" To run Java applications but not compile code: yum install java-17
dirname $(dirname $(readlink -f $(which java))) Add to /etc/environment or /etc/profile.d/java.sh : sudo yum install java-17-openjdk For compiling and running