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 Linux, Microsoft Windows, and macOS.

JRE compatibility

The most recent versions of Caplin Platform 7.1 components are compatible with Oracle Java 8 (<=8u202), Red Hat OpenJDK 8, and Red Hat OpenJDK 11.

For detailed information JRE compatibility, see Caplin Platform System Requirements.

Installing Java on Red Hat Enterprise Linux

To install Red Hat OpenJDK 11 (available in RHEL 7), follow the steps below:

  1. Install Red Hat OpenJDK 11:

    $ sudo yum install java-11-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_11
  3. Run the command below and select OpenJDK 11 as the JDK that provides the javac command on the command line:

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

    $ sudo alternatives --config java
Installing Red Hat OpenJDK 8

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

  1. Install Red Hat OpenJDK 8:

    $ sudo yum install java-1.8.0-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_1.8.0
  3. Run the command below and select OpenJDK 8 as the JDK that provides the javac command on the command line:

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

    $ sudo alternatives --config java
Installing Oracle Java 8

To install Oracle Java 8 (8u202), follow the steps below:

  1. From the Oracle website, download the RPM for Oracle JDK 8 64-bit (8u202).

    Versions of the Oracle JDK 8 greater than update 202 (8u202) require a licence for commercial use. For more information, see the Oracle Java SE Licensing FAQ on the Oracle website.
  2. Install the RPM:

    $ sudo yum install ./jdk-<version>-linux-x64.rpm
  3. 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:

    JAVAC_PATH=$(readlink -f /etc/alternatives/javac)
    export JAVA_HOME=${JAVAC_PATH%/bin/javac}
  4. Run the command below and select the Oracle JDK 8 as the JDK that provides the javac command on the command line:

    $ sudo alternatives --config javac
  5. Run the command below and select the Oracle JDK 8 as the JRE that provides the java command on the command line:

    $ sudo alternatives --config java
  6. Log off and log back in to your account.

Installing Java on Microsoft Windows

To install OpenJDK 11 on Microsoft Windows, follow the steps below:

  1. Download the AdoptOpenJDK 11 installer from the AdoptOpenJDK website.

  2. Run the installer, and, when prompted, enable the following installation options:

    • Add to PATH

    • Set JAVA_HOME

Installing OpenJDK 8

To install OpenJDK 8 on Microsoft Windows, follow the steps below:

  1. Download the AdoptOpenJDK 8 installer from the AdoptOpenJDK website.

  2. Run the installer, and, when prompted, enable the following installation options:

    • Add to PATH

    • Set JAVA_HOME

Installing Oracle Java 8

To install Oracle Java 8 (8u202), follow the instructions below:

  1. Download and install the Oracle JDK 8 (8u202) from the Oracle website.

    Versions of the Oracle JDK 8 greater than update 202 (8u202) require a licence for commercial use. For more information, see the Oracle Java SE Licensing FAQ on the Oracle website.
  2. On your keyboard, press Windows + Pause to open the System window

  3. In the System window, navigate to Advanced system settings > Environment Variables

  4. Set the value of the JAVA_HOME system environment variable to the full path to the JDK’s directory. For example: C:\Program Files (x86)\Java\jdk1.8.0_60

  5. Append the JDK’s bin subdirectory to the PATH system environment variable, using a semi-colon to separate it from the preceding paths.

    You can reference the JAVA_HOME variable when specifying the location of the JDK’s bin subdirectory. For example: %JAVA_HOME%\bin

Installing Java on Apple macOS

To install OpenJDK 11 on macOS, follow the steps below:

  1. Download the AdoptOpenJDK 11 from the AdoptOpenJDK website.

  2. Follow the macOS PKG installer packages instructions on the AdoptOpenJDK website.

Installing OpenJDK 8

To install OpenJDK 8 on macOS, follow the steps below:

  1. Download the AdoptOpenJDK 8 from the AdoptOpenJDK website.

  2. Follow the macOS PKG installer packages instructions on the AdoptOpenJDK website.

Installing Oracle Java 8

To install Oracle Java 8 (8u202), follow the steps below:

  1. Download and run the Oracle JDK 8 (8u202) installer from the Oracle website.

    Versions of the Oracle JDK 8 greater than update 202 (8u202) require a licence for commercial use. For more information, see the Oracle Java SE Licensing FAQ on the Oracle website.
  2. Update your ~/.bash_profile file with the following line:

    export JAVA_HOME=$(/usr/libexec/java_home)

    By default, the /usr/libexec/java_home program returns the path to the most recently installed JDK. To return the path to a specific version of Java, use the -v option. For example, to return the path to the latest version of Java 8, use the line below:

    export JAVA_HOME=$(/usr/libexec/java_home -v 1.8)
  3. Log off and log back in to your account.

    The ~/.bash_profile file is only run on login.

For more information on installing Oracle Java on macOS, see Information and system requirements for installing and using Oracle Java on Mac OS X.

On starting a Caplin application, you may see one or both of the errors below:

  • "No Java runtime present, requesting install"

  • "To open this Java application you need to install the legacy Java SE 6 runtime"

These errors appear to be caused by an issue with the default installation of Oracle Java 8 on macOS, which does not declare all of Java 8’s capabilities in Java 8’s macOS application metadata file Info.plist.