In this tutorial, we will explain how to install one or more Java (OpenJDK) versions on CentOS 8 and how to set the default Java via alternatives. The default CentOS 8 repositories include the latest two major Java LTS versions, Java 8 and Java 11. OpenJDK is an open-source implementation of the Java Platform. Permits only non-commercial use of the software, such as personal use and development use. There are two different implementations of Java, OpenJDK and Oracle Java, with almost no differences between them, except that Oracle Java has a few additional commercial features. Java is one of the most popular programming languages used to build different types of applications and systems.