TSTool / Development Environment / Java 8
Introduction
Java 8 is currently required for TSTool development. Java 9 and newer versions will be evaluated and will be phased in as soon as possible, but requires confirmation that deployed systems including Linux variants support Java 9.
Java 32-bit is currently required because some native libraries used by TSTool are 32-bit,
in particular the HEC-DSS libraries, which are used by ReadHecDss
and WriteHecDss
commands.
64-bit versions of these libraries need to be integrated with TSTool in order to fully support 64-bit development environment.
64-bit development environment and deployed Java can be used if 32-bit native features are not used (but such features will fail tests).
For example, if TSTool is running out of memory for large workflows,
the installation configuration can be changed to use a 64-bit Java.
This increases the memory ceiling that can be used at run-time, but 32-native features like HEC-DSS support will not work.
It is possible to change the run-time Java for deployed TSTool software by swapping the Java Runtime Environment (JRE) that is distributed with TSTool.
Windows
Download Java 8
TSTool has traditionally been developed using Oracle Java. The major version (8) is important and otherwise the latest minor version can be downloaded to ensure support for recent operating systems and for security patches.
Download the Java SE Development Kit from the Oracle Java Download Site.
The 32-bit version is named Windows x86
or similar and the download file will be named jdk-8u171-windows-i586.exe
or similar.
Install Java 8
Run the installer from the previous step. Administrator privileges will be required. The following procedure may vary slightly as new Java releases are made.
Java Installation - Welcome (see full-size image)
Press Next > to continue.
Java Installation - Custom Setup (see full-size image)
Accept the defaults in the above dialog without changing.
Note that since installing the 32-bit version the installation folder is C:\Program Files (x86)
.
Other installations of Java may already exist on the computer, which is OK.
Press Next > to continue.
Java Installation - Destination Folder (see full-size image)
Accept the defaults in the above dialog without changing. Press Next > to continue. A progress indicator will be shown.
Java Installation - Complete (see full-size image)
Press Close to close the above dialog.
Create Symbolic Links for Java 8
The Java installation process creates files as shown in the following image.
Java Installation Folders (see full-size image)
The use of version-specific folder can be problematic because Eclipse Java Runtime Environment and build utilities must be configured to use the specific version. This may result in developers with different minor versions of Java flip-flopping repository contents. To minimize such issues, open a Windows command shell with Administrator privileges and create symbolic links as shown in the following image and summarized below. Actualy, Exclipse seems to traverse the link and use the specific resource in its environment, showing the full path rather than the link, but it is convenient nevertheless and is needed for the step below.
mklink /d jdk8 jdk1.8.0_171
mklink /d jre8 jre1.8.0_171
Java Symbolic Links (see full-size image)
In addition, the automated build system uses JRE folder that requires another symbolic link to find the JRE to distribute with the installer.
Create the link as follows in the C:\Program Files (x86)\Java
folder:
mklink /d jre_18 jre8
Confirm Run Script Configuration
The order that Java and Eclipse are installed may vary. These major development environment components need to be configured appropriately and it is useful to use a run script to start Eclipse.
Linux
This documentation was prepared while installing Java 8 on a Debian Stretch Linux VirtualBox virtual machine. Other environments will be similar.
Java 8 was installed using the following command:
$ sudo apt-get install openjdk-8-jdk