Teamprise Knowledge Base

TKB00018 Specifying a Java Runtime Environment for Teamprise Explorer

Last updated 2006-04-10 20:43:07 UTC by Ben Pryor

Purpose

This article explains how Teamprise Explorer chooses a Java Runtime Environment (JRE) to use. Instructions for explicitly specifying a JRE are also given.

Introduction

Teamprise Explorer is normally launched by running a native launcher executable (for example, TeampriseExplorer.exe on Windows). One of the things this launcher program does is to locate a Java Runtime Environment (JRE) for Teamprise Explorer. The native launcher normally selects the proper JRE to use and requires no additional configuration. However, in some cases you may need to explicitly specify a JRE to use, such as:

  1. Many Linux distributions come with the GCJ JRE installed as the first JRE in the path. This JRE will not work with Teamprise Explorer, and you will need to specify a different JRE to use, such as a JRE downloaded from Sun.
  2. The native launcher may not be able to find a JRE, even though you have one installed. For example, the JRE binaries may exist on your system but the java executable is not in the path. In this case, you will need to explicitly point Teamprise Explorer to the installed JRE.
  3. The native launcher may select the wrong JRE to use. For example, you may have Java versions 1.3 and 1.5 installed on your system. Depending how which order you installed the Java runtimes in, Teamprise Explorer may select the 1.3 version instead of the 1.5 version. In this case, you will need to explicitly specify the 1.5 JRE.

JRE Search Mechanism

The launcher executable searches for a JRE by doing the following:

  1. If a JRE exists inside the Teamprise Explorer installation directory, that JRE is used. Specifically, if there is a directory called jre at the same level as the native launcher, and that directory contains a full Java JRE, that JRE will be used to launch Teamprise Explorer.
  2. The native launcher next looks for a JRE executable in the current path (for example, javaw.exe on Windows).

If the native launcher does not find a JRE using the above mechanism, an error dialog is displayed. For example, on Windows, the error dialog looks like:

JRE Version Requirement

Teamprise Explorer requires a Java 1.4 or higher runtime. If the native launcher finds a JRE, and that JRE is Java 1.3 or lower, an error dialog is displayed. For example, on Windows, the error dialog looks like:

Explicitly Specifying a JRE Using the -vm Switch

The native launcher can take an optional switch that specifies the full path to a JRE to use. Explicitly specifying a JRE in this way overrides the JRE search mechanism described above.

For example, the following command on Windows will launch Teamprise Explorer to use the specified JRE

    TeampriseExplorer.exe -vm c:\jre\bin\java.exe
    

Explicitly Specifying a JRE Using a Symlinked JRE Directory

A common configuration on Unix-style platforms is to create symlinked JRE directory in the Teamprise Explorer installation directory.

For example, assume the following:

  1. Teamprise Explorer is installed in /home/user/TeampriseExplorer
  2. A Java JRE is installed in /home/user/jre1.5.0_06

The following command will create a symlinked JRE directory in the Teamprise Explorer install directory:

    ln -s /home/user/jre1.5.0_06 /home/user/TeampriseExplorer/jre
    

When Teamprise Explorer is launched, the JRE in the symlinked directory will be used.

A similar effect can be achieved on Windows by copying a JRE directory into the Teamprise Explorer installation directory and naming it jre.

For More Information

The Teamprise Explorer native launcher is a standard Eclipse launcher executable. You can view the Eclipse documentation for the launcher executable.

Products affected:

  • Teamprise Explorer

Releases affected:

  • All

Platforms affected:

  • All

This article is referenced by these articles:

Keywords: explorer jre