Chapter 2. Installing OpenJDK
The following sections describe how to install OpenJDK on Microsoft Windows and Red Hat Enterprise Linux (RHEL).
2.1. Installing OpenJDK on Windows
The following section describes how to install OpenJDK 11 on Windows using the MSI-based installer.
2.1.1. Additional resources
- For more information on how to install OpenJDK 11, see the Installing and Using OpenJDK 11 for Windows Guide.
2.2. Installing OpenJDK on RHEL
The following section describes how to install OpenJDK 11 on RHEL.
A registered system with attached subscriptions.
For more information, see the Registering the system and managing subscriptions Guide.
To install OpenJDK RPMs, run:
# yum install java-11-openjdk-devel
Optionally, you can install the java-11-openjdk-src and the java-11-openjdk-demo packages. The java-11-openjdk-src package contains the complete OpenJDK 11 class library source code you can use with IDE indexers and debuggers. The java-11-openjdk-demo package contains Java runtimes for OpenJDK (demos and examples).
To install java-11-openjdk-demo and java-11-openjdk-src, run:
# yum install java-11-openjdk-src java-11-openjdk-demo
If you encounter the following error message while attempting to log in to the OpenShift cluster, configure your Java to use TLSv1.2. This problem only occurs in Java JDK versions prior to Java 11.0.7 and OpenShift cluster 4.4.0 or higher.
Unable to execute request to request url https://<openshift-cluster-oauth-authorization-server>
To configure Java to use TLSv1.2:
Open the file
codereadystudio.inilocated in the
studiodirectory inside of the CodeReady Studio installation directory.
Add the following line under the
- Open the file
2.2.1. Additional resources
- For more information on how to install, run, and switch between two parallel installed major OpenJDK versions on RHEL8, see How to install Java 8 and 11 on Red Hat Enterprise Linux 8.