Install Java
The Java Runtime Environment (JRE) is not installed with the Datalink (Classic) Agent and must be installed manually. Datalink (Classic) should run on most implementations of Java 11 including those found here for Datalink (Classic) 4.9, and similar versions of JRE 8 for Datalink (Classic) 4.8.
Apptio does not endorse or require any particular implementation of Java. AdoptOpenJDK is used here as an example. Please refer to your IT policy to determine the suitability of any software.
Install the JRE on a Windows machine
- Go to AdoptOpenJDK 11 (LTS) .
- Select a OpenJDK 11 HotSpot implementation appropriate for your operating system.
- For almost all current Windows versions, this means the x64 architecture.
- Download the .msi file.
You can use either the JDK or the JRE. The JRE is recommended unless you have other software which requires the JDK.
- Open the file to launch the installation program.
- In Custom Setup , you can choose the features that you want to install
and, optionally, change the default installation directory.
By default, AdoptOpenJDK installs to c:\ProgramFiles\AdoptOpenJDK\<package>
- Select the checkbox next to the directory tree it is available for to update the JAVA_HOME environment variable.
- Select the required features, and then select Next .
- Select Install to begin the installation.
- When the installation is completed, select Finish to close the program.
- Follow the steps in Run the Datalink (Classic) Agent setup wizard .
If you have not used the installation options to set JAVA_HOME and append it to PATH environment variables or have used a different Java distribution, you need to configure the variables manually by using the Environment Variables... control panel in the Advanced system settings in Windows. The environment variables should look like the following:
JAVA_HOME : C:\Program Files\AdoptOpenJDK\jdk-11.0.9.101-hotspot (the location of Java installation)
PATH : <previously existing PATH>;%JAVA_HOME%\bin
You can see if OpenJDK installed correctly by typing the following command in the
Windows command prompt:
C:\Windows\system32> java --version
If the result points to the newly installed OpenJDK , as in the example below, then you have installed the JRE correctly.
Example:
java --version
openjdk 11.0.9.1 2020-11-04
OpenJDK Runtime Environment AdoptOpenJDK
(build 11.0.9.1+1)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.9.1+1, mixed
mode)
Install the JRE on Ubuntu Linux
The best option for installing Java 11 is to use the version packaged with your Linux distribution. By default, Ubuntu 20.04 includes OpenJDK version 11, which is an open-source variant of the JRE and the JDK.
The example steps below are given for the Ubuntu Linux distribution. The steps required for other Linux distributions vary. Consult your Linux administrator if you need assistance.
- In the command prompt, check if Java is already installed with the following command:
$ java --version
If Java is not currently installed, you can see the following output:
Output
Command 'java' not found, but can be installed with:
apt install default-jre
apt install openjdk-11-jre-headless
apt install openjdk-8-jre-headless - Execute the following command to install the default JRE:
$ sudo apt update
$ sudo apt install default-jreThis installs the JRE from OpenJDK 11.
- Verify the installation with the following command:
$ java --version
Output should be similar to
openjdk version "11.0.7" 2020-04-14
OpenJDK Runtime Environment (build 11.0.7+10-post-Ubuntu-2ubuntu218.04)
OpenJDK 64-Bit Server VM (build 11.0.7+10-post-Ubuntu-2ubuntu218.04, mixed mode, sharing) - Follow the steps in Run the Datalink (Classic) Agent setup wizard .
Troubleshooting
If you face Java heap space error, add the below details to environment variables and restart the instance.
JAVA_OPTS=-Xms512m -Xmx1024m
ENGINE_JAVA_OPTS=-Xms512m -Xmx1024m
This will increase the max heap size in the memory to 1 GB and rule out any heap related issues.