You are on page 1of 6

Managing multiple instances of JAVA on same

host

Background

Unlike many Windows applications, multiple instances of JAVA may be


installed on a single host.

Multiple installs may be of the same version, or a mix of earlier and newer
versions.

Various SIEMENS/PLM products require that JAVA be installed on the local


host.

However, JAVA version requirements may differ.

For example, NX requires that JAVA be installed to support part file


translation. The actual version number is not critical. On the other hand,
UGDOC requires BOTH 32bit and 64bit versions of JAVA to be installed.

What methods can be used to determine the number, version and


attributes of all JAVA versions on a single host?

General Principles

The UGII_JAVA_HOME environment variable must point to the base


directory of the JRE installation.

How to find all instances of JAVA installed on any one host

Method 1)

Start ->

All Programs ->

Accessories ->

Command Prompt

C:\> cd /d c:\ ! Change directory to root of "C" drive.


C:\> dir/s java.exe ! find all instances of JAVA on host.

Advantage of Method 1)

ALL JAVA images will be found even if java.exe was not "installed".

Disadvantage of Method 1)

JAVA.EXE may be located on alternate file systems including mapped


drives.

Method 2)

Start ->

Control Panel ->

Programs ->

Programs and Features

All installed Java version(s) are listed.


Advantage of Method 2)

ALL installed JAVA images are displayed in a single listing.

Disadvantage of Method 2)

Copies of java.exe that haven't been installed using the Microsoft


Installer are not listed.

How to determine the attributes of any instance of JAVA.

Method 1)

Start ->

All Programs ->

Accessories ->

Command Prompt

Change directory to valid JAVA install location

Example:

cd /d c:\apps\Java\jre7x64\bin\javacpl

Java Control Panel will appear.

Select tab of interest (ie. Security).

Method 2)

Start ->

Control Panel ->


Select Java Control Panel Applet. ! Note: not always installed.

How to determine if 64-bit JVM or 32-bit JVM is installed

Start ->

All Programs ->

Accessories ->

Command Prompt

Example:
Change directory to each individual JAVA install location

Example:

c:\apps\Java\jre7x64\bin\java -version

java version "1.7.0_25"

Java(TM) SE Runtime Environment (build 1.7.0_25-b16)

Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)

And then change directory to:

c:\apps\Java\jre7\bin\java -version

java version "1.7.0_25"

Java(TM) SE Runtime Environment (build 1.7.0_25-b16)

Java HotSpot(TM) Client VM (build 23.25-b01, mixed mode, sharing)

Even though the versions and build are identical, the 32-bit install will
display the "sharing" attribute.

Author
Jim Palmer
GTAC Systems

You might also like