# Installing Java

On the Caplin Platform, a Java runtime environment (JRE) is used to run Java-based DataSources (integration adapters) and to run Java modules in C-based DataSources. This page provides an overview of the steps required to install a Caplin Platform compatible JRE on Red Hat Enterprise Linux.

## JRE compatibility

For detailed information JRE compatibility, see [Caplin Platform System Requirements](../platform-architecture/platform-hardware-and-software-requirements.md).

## Installing Java on Red Hat Enterprise Linux

To install Red Hat OpenJDK 17 (available in RHEL 8 and 9), follow the steps below:

1. Install Red Hat OpenJDK 17:

   ```
   $ sudo yum install java-17-openjdk-devel
   ```
2. In the home directory of the user account used to run Caplin Platform components, edit the file `~/.bash_profile` and set the JAVA_HOME variable to the value below:

   ```
   export JAVA_HOME=/etc/alternatives/java_sdk_17
   ```
3. Run the command below and select OpenJDK 17 as the JDK that provides the `**javac**` command on the command line:

   ```console
   $ sudo alternatives --config javac
   ```
4. Run the command below and select OpenJDK 17 as the JRE that provides the `**java**` command on the command line:

   ```console
   $ sudo alternatives --config java
   ```
