install java 1.8 on centos 7 code example Example: install java centos 8 sudo dnf install java-11-openjdk-devel