Skip to content

Java Runtime Environment

This documentation focuses on technical issues related to the Java Runtime Environment.


Java Language

TSTool is written in the Java language, with use of C or other languages only when used by third-party components. The TSTool RunPython command does allow integrating Python and TSTool/Java and future TSTool releases may further support this approach, but languages other than Java are not currently used for primary functionality. Java source code consists of files with *.java filename extension. Code files include classes, interfaces, enumerations, etc. The source code is compiled into bytecode in class files with *.class filename extension. These files are directly used in the development environment to run TSTool and are packaged into Java Archive (*.jar) files for distribution and use at run-time.

Java Runtime Environment

A Java Runtime Environment (JRE) that is the same or newer than the Java version used in the development environment is required to run TSTool in the operational environment. For example, TSTool developed and distributed with Java 8 cannot be run using JRE 7. Although it is possible to rely on a Java version on the computer, TSTool software is distributed with its own JRE. See the jre_VERSION folder under the TSTool installation, for example jre_18 when Java 8 is used (the convention of using 1.8 for Java 7, etc. is from Java developers and TSTool conventions need to migrate to the more easily understood "8" as time allows to make this change). The JRE allows Java to be run in a protected virtual environment separate from other Java installations on the computer.

Java Launcher

The JRE is runs TSTool via a TSTool launcher program. On Windows, the open source Launch4J software is used to run TSTool.

On Linux the tstool script is used.

64-bit and 32-bit Versions

As of TSTool version 14.0.0, 64-bit java is used for development and runtime libraries. Some 32-bit features are disabled as discussed below.

TSTool prior to version 14.0.0 uses 32-bit java, which supports components that use native Windows 32-bit libraries, in particular the HEC-DSS libraries. These features will be updated to 64-bit as resources allow.

Classpath

The JRE starts by specifying the class path to look for *.class and *.jar files in the installation bin/ folder.

Plugins and Class Loaders

TSTool 12.x is beginning to support plugin datastores and commands. This requires that the JRE is able to dynamically load code from plugin jar files. It also is helpful to isolate such plugin files from the main distribution. Determining the best way to support plugins is an area of active research and development. New features in Java 9 may simplify plugin implementation. However, Java 9 is not currently being used as of TSTool 12.x. See also: