Installing Java

The Caplin Platform requires the Oracle Java Development Kit (JDK) in order to run Java-based Caplin Platform Blades (CPB) and the JMX monitoring service. This page provides an overview of the steps required to install Oracle Java and set the JAVA_HOME environment variable on Windows, Red Hat Linux and Mac OS X.

Note: always install an Oracle JDK compiled for the same architecture, 32-bit or 64-bit, as the Liberator and Transformer binaries in your deployment.

Installing Java on Microsoft Windows

To install Oracle Java and set the JAVA_HOME environment variable, follow the instructions below:

  1. Download and install the Oracle JDK from the Oracle website.
    • Note: Caplin Platform 6.2 binaries for Microsoft Windows require a 32-bit Oracle JDK. Caplin Platform 7 binaries for Microsoft Windows require a 64-bit Oracle JDK.
  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.
    1. Tip: rather than repeat the path to the JDK directory, you can reference the JAVA_HOME variable. For example: %JAVA_HOME%\bin 

Installing Java on Red Hat Linux

Red Hat Linux supports the installation of multiple JDKs, and provides the alternatives command to select the active JDK. Follow the instructions below to install Oracle Java and set the JAVA_HOME environment variable.

  1. Prepare the alternatives file-system links by installing the OpenJDK development package of the same major version as the Oracle JDK you want to install. For example, to prepare for the installation of Oracle JDK 8, install the OpenJDK 8.
    1. $ sudo yum install java-1.8.0-openjdk java-1.8.0-openjdk-devel
  2. From the Oracle website, download the RPM for the version of Oracle JDK that you require.
    1. Note: Caplin Platform binaries compiled for Linux require a 64-bit Oracle JDK.
  3. Install the downloaded RPM. The example command below installs the RPM for the Oracle JDK 8 update 65 (64-bit).
    1. $ sudo yum install jdk-8u65-linux-x64.rpm
  4. Run the two commands below to select the active Java installation. When prompted, select the Oracle JDK as the default installation.
    1. $ sudo alternatives --config java
    2. $ sudo alternatives --config javac
  5. Add the following lines to your ~/.bash_profile file:
    1. JAVAC_PATH=$(readlink -f /etc/alternatives/javac)
    2. export JAVA_HOME=${JAVAC_PATH%/bin/javac}
    3. Note: /etc/alternatives/javac is symlink that is updated by the command alternatives --config javac
  6. Log off and log back in to your account.
    1. The ~/.bash_profile file is only run on login.

Installing Java on Mac OS X

Follow the instructions below to install Oracle Java and set the JAVA_HOME environment variable.

  1. Download and run the Oracle JDK installer from the Oracle website.
  2. Update your ~/.bash_profile file with the following line:
    1. export JAVA_HOME=$(/usr/libexec/java_home)
    2. Note: By default, the /usr/libexec/java_home program returns the path to the most recently installed JDK.
  3. Log off and log back in to your account.
    1. The ~/.bash_profile file is only run on login.

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