Questo contenuto non è disponibile nella lingua selezionata.
Chapter 2. Installing OpenJDK
The following section describes how to install OpenJDK on Microsoft Windows and Red Hat Enterprise Linux (RHEL).
2.1. Installing OpenJDK on Windows Copia collegamentoCollegamento copiato negli appunti!
The following section describes how to install OpenJDK 1.8.0 on Windows using the MSI-based installer.
Procedure
- Download the MSI-based Installer from Red Hat Developer Portal.
- Run the installer and follow the on-screen installation instructions.
- Configure CodeReady Studio to use OpenJDK by following the instructions for Working with Java Runtime Environments.
2.1.1. Additional Resources Copia collegamentoCollegamento copiato negli appunti!
- For more information on how to install OpenJDK 11, see the OpenJDK 11 for Windows Getting Started Guide.
2.2. Installing OpenJDK on RHEL Copia collegamentoCollegamento copiato negli appunti!
The following section describes how to install OpenJDK 1.8.0 and OpenJDK 11 on RHEL.
Prerequisites
-
Rootaccess. Registered system with attached subscriptions.
For more information, see the Registering the system and managing subscriptions Guide.
2.2.1. Installing OpenJDK 1.8.0 on RHEL Copia collegamentoCollegamento copiato negli appunti!
The following section describes how to install OpenJDK 1.8.0 on RHEL.
Procedure
To install OpenJDK RPMs, use:
yum install java-1.8.0-openjdk-devel
# yum install java-1.8.0-openjdk-develCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Optionally, you can install the java-1.8.0-openjdk-src and the java-1.8.0-openjdk-demo packages. The java-1.8.0-openjdk-src package contains the complete OpenJDK 8 class library source code you can use with IDE indexers and debuggers. The java-1.8.0-openjdk-demo package contains Java runtimes for OpenJDK (demos and examples).
To install java-1.8.0-openjdk-demo and java-1.8.0-openjdk-src, use:
yum install java-1.8.0-openjdk-src java-1.8.0-openjdk-demo
# yum install java-1.8.0-openjdk-src java-1.8.0-openjdk-demoCopy to Clipboard Copied! Toggle word wrap Toggle overflow
2.2.2. Installing OpenJDK 11 on RHEL Copia collegamentoCollegamento copiato negli appunti!
The following section describes how to install OpenJDK 11 on RHEL.
Procedure
To install OpenJDK RPMs, use:
yum install java-11-openjdk-devel
# yum install java-11-openjdk-develCopy to Clipboard Copied! Toggle word wrap Toggle overflow
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 8 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, use:
yum install java-11-openjdk-src java-11-openjdk-demo
# yum install java-11-openjdk-src java-11-openjdk-demoCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Troubleshooting
If you are unable to login to OpenShift 4.4.0 cluster, use JDK 8 with SSL protocol set to default or configure your Java to use TLSv1.2 as your SSL protocol.
To configure Java to use TLSv1.2, run:
java -Djdk.tls.client.protocols=TLSv1.2 MyApplication.jar
$ java -Djdk.tls.client.protocols=TLSv1.2 MyApplication.jarCopy to Clipboard Copied! Toggle word wrap Toggle overflow Replace MyApplication with the name of the application.
2.2.3. Additional resources Copia collegamentoCollegamento copiato negli appunti!
- 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.