Chapter 3. Selecting an installed Red Hat build of OpenJDK version for a specific application
Some applications require a specific Red Hat build of OpenJDK version to run. If multiple versions of Red Hat build of OpenJDK are installed on the system using the yum package manager or portable bundle, you can select a Red Hat build of OpenJDK version for each application where necessary by setting the value of the JAVA_HOME environment variable or using a wrapper script.
Prerequisites
- Multiple versions of Red Hat build of OpenJDK installed on the machine.
- Ensure that the application you want to run is installed.
Procedure
Set the
JAVA_HOMEenvironment variable. For example, if Red Hat build of OpenJDK 17 was installed usingyum:$ JAVA_HOME=/usr/lib/jvm/java-17-openjdkNoteThe symbolic link
java-17-openjdkis controlled by thealternativescommand.Do one of the following:
Launch the application using the default, system-wide configuration.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Launch the application specifying the
JAVA_HOMEvariable:Copy to Clipboard Copied! Toggle word wrap Toggle overflow