IBM Update Installer for Java

Readme

Last updated 22 September 2010.

(c) Copyright International Business Machines Corporation, 2010. All rights reserved.

U.S. Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.

Contents

Introduction
Downloading and installing the Update Installer for Java
Getting started with the Update Installer for Java
Using the Update Installer for Java
Restoring changes applied by the Update Installer for Java
Known limitations

Introduction

The Update Installer for Java updates IBM-supplied releases and service refreshes of the Java SDK and JRE with updates that are provided by IBM support. Two types of updates are supported:

Debug modules
Used to collect data for problem determination.
Test fixes
Used to verify new fixes.

An update can contain any of the following file types:

The Update Installer for Java updates an IBM-supplied SDK or JRE with the update if two conditions are met:

  1. The version of the SDK or JRE is compatible with the version specified in the update.
  2. The current update is compatible with any updates already applied to the SDK or JRE through the Update Installer for Java.

Supported platforms

For IBM Java 1.4.2, Java 5.0 and Java 6:

For IBM Java on Solaris or HP-UX:

SDKs and JREs detected and updated by the Update Installer for Java

SDKs and JREs not detected or updated by the Update Installer for Java

Downloading and installing the Update Installer for Java

To download and install the Update Installer for Java:

  1. Create a local directory for the Update Installer for Java; for example, /tmp/JavaUpdateInstaller or C:\JavaUpdateInstaller.
  2. Access the following download page on developerWorks: Update Installer for Java
  3. Download the compressed file to your local directory, using binary transfer mode.
  4. Extract the files. For example, to extract the files using the jar utility, use the following command-line option: jar -xvf filename, where filename is the compressed file.

Getting started with the Update Installer for Java

Prerequisites

Before you begin, ensure that:

  1. You have a working Java SDK or JRE installation to run the Update Installer for Java.
  2. The SDK or JRE being updated is not currently in use by an application. If the SDK or JRE is in use, you might encounter errors as described in Known limitations.
  3. You have root or administrator privileges to run the Update Installer for Java, so that all the Java instances on the system can be found and updated.

Usage

Run the Update Installer for Java from the command line, using the following syntax:

java -jar JavaUpdateInstaller.jar [-options]
where -options include:

-discover [all | update]
Searches the system and discovers Java installations, or Java installations that contain a specific update, where:
all discovers all Java installations.
update is the full path to the jar file containing the update. For example; c:\updates\56789.001.866_AAA_X.jar
-install update [SDK-Path | SDKListFile]
Installs the update to compatible SDKs or JREs, where:
update is the full path to the jar file containing the update. For example; c:\updates\56789.001.866_AAA_X.jar
SDK-Path is the full path to the Java installation.
SDKListFile is the full path to the SDKList.txt file created during the discovery process. For example; /java/SDKList.txt
-force update [SDK-Path | SDKListFile]
Forcibly installs the update to SDKs or JREs, where:
update is the full path to the jar file containing the update. For example; c:\updates\56789.001.866_AAA_X.jar
SDK-Path is the full path to the Java installation.
SDKListFile is the full path to the SDKList.txt file created during the discovery process. For example; /java/SDKList.txt
-remove [updateName | all] SDK-Path
Removes updates from SDKs or JREs, if possible, where:
updateName is the name of the update you want to remove. For example; 56789.001.866_AAA_X
all removes all updates applied by the Update Installer for Java.
SDK-Path is the full path to the Java installation.
-query SDK-Path
Queries the SDK or JRE and lists the updates that are applied, where:
SDK-Path is the full path to the Java installation.
-help
Lists the available options.

Using the Update Installer for Java

Read this section for more detailed information about using the Update Installer for Java, including:

Searching for Java installations
Updating Java Installations
Forcibly updating Java Installations
Querying update information for Java installations

Searching for Java installations

To search for Java installations, use the -discover option. The Update Installer for Java determines which system directories to search using the file DirectorySearch.txt. Edit this file to restrict the directories that are searched. By default, every directory is searched. To learn more about restricting your search, see Selective searching. Any SDKs or JREs found during the search are listed in the file SDKList.txt.

Use the -discover update option to search for SDKs or JREs that are compatible for the specified update. You can use Selective searching to restrict the directories that are searched. The Update Installer for Java records the SDKs or JREs that have updates applied in the SDKlist.txt file.

The SDKList.txt file is re-generated every time you run the tool with the –discover option. Edit this file to remove any Java installations that you do not want to update. This example Windows SDKList.txt file shows four Java installations:


C:\JDKS\pwi3260sr3-20081106_07-sdk\sdk
C:\JDKS\pwi3260sr4ifx-20090228_01-sdk\sdk
C:\JDKS\pwi3260sr5-20090529_04-sdk\sdk
C:\Program Files\IBM\Java60

Selective searching

Directory searching is controlled by the DirectorySearch.txt file. Edit this file to restrict where the Update Installer for Java searches for SDKs or JREs on your system. Each entry must begin on a new line.

Adding and removing directories

You can add and remove locations from the search by including a directory in the DirectorySearch.txt file with a + or - at the beginning. There must not be a space between the + or - and the name of the directory.

On Windows, a DirectorySearch.txt file containing:

+c:\programs
-c:\programs\ibm\java5

causes the Update Installer for Java to recursively search the contents of the c:\programs directory, excluding c:\programs\ibm\java5 and all its subdirectories.

On other platforms, a DirectorySearch.txt file containing:

+/usr
-/usr/bin

causes the Update Installer for Java to recursively search the contents of the /usr directory, excluding /usr/bin and all its subdirectories.

The all keyword

If the all entry is the first entry in the DirectorySearch.txt, the Update Installer for Java searches everywhere on the system except for specified exclusions. If the all entry is not in the file, or is not the first entry in the file, the Update Installer for Java searches only in specified locations.

On Windows, a DirectorySearch.txt file containing:

all
-c:\workarea

causes the Update Installer for Java to search the entire system except the c:\workarea directory.

On other platforms, a DirectorySearch.txt file containing:

all
-/proc

causes the Update Installer for Java to search the entire system except the /proc directory. This is the default on AIX, z/OS, Linux, Solaris, and HP-UX platforms.

Directories to exclude on AIX, z/OS, Linux, Solaris, and HP-UX platforms

By default, the Update Installer for Java does not search the /proc directory. This directory is excluded because it contains dynamically generated directories that could form an infinite loop.

You might also consider excluding the /dev and /sys directories depending on your platform. The /etc, /tmp, and /var directories are also unlikely to contain JREs.

Updating Java Installations

Install updates to Java installations using the -install option.

Use -install update SDKlistFile to install updates to multiple SDKs or JREs, where:

You can also update a specific SDK or JRE using the -install update SDK-Path option, where SDK-Path is the file path to the SDK or JRE installation.

The Update Installer for Java issues a warning message if the update you want to install is incompatible with an existing update. Restore the SDK or JRE to a full service refresh level or approved i-fix level before attempting the update process again.

If the update is compatible with the SDK or JRE, the Update Installer for Java backs up all the files that need to be updated in the directory BackupDirectory\updateName. This directory is created as a sub-directory within the SDK or JRE installation. The original files are overwritten by the files contained in the update.

Forcibly updating Java installations

The -force option is the same as the -install option, but without an update compatibility check. The Update Installer for Java does not check if the specified update is compatible with updates that are already applied to the Java installation by the Update Installer for Java.

Querying update information for Java installations

When you use the Update Installer for Java to update a Java installation, the tool maintains two key files in the root SDK or JRE install directory:

JUIUpdateData.xml
This data file contains the list of updates applied to the SDK or JRE. Update information is added or removed from the list, depending on the Update Installer for Java action.
JUIUpdateHistory.xml
This file contains a record of all the updates that are applied or removed from the Java installation, including the date, as shown in the example.
<?xml version="1.0" encoding="UTF-8"?>
<JavaUpdateInstaller>
    <history installedUpdate="50967,001,866_DBG_1" timeStamp="Wed Sep 22 18:05:37 IST 2010"/>
    <history removedUpdate="50967,001,866_DBG_1" timeStamp="Wed Sep 22 18:15:28 IST 2010"/>
    <history installedUpdate="45678,001,866_FIX_1" timeStamp="Wed Sep 22 19:26:10 IST 2010"/>
</JavaUpdateInstaller>

Example: JUIUpdateData.xml file.

These data files must not be modified in any way.

Use the -query SDK-Path option to check the updates applied to a Java installation, where SDK-Path is the file path to the SDK or JRE installation. The Update Installer for Java retrieves the information from the JUIUpdateData.xml file.

On IBM Java 6, the Update Installer for Java modifies the output of the java -version command to include the update details. Run this command to check whether the SDK or JRE has been updated correctly.

java version "1.6.0"
Java(TM) SE Runtime Environment (build pwi3260sr5-20090529_04(SR5) + 56789,001,866_FIX_1)
IBM J9 VM (build 2.4, J2RE 1.6.0 IBM J9 2.4 Windows XP x86-32 jvmwi3260sr5-20090519_35743 (JIT enabled, AOT enabled)
J9VM - 20090519_035743_lHdSMr
JIT  - r9_20090518_2017
GC   - 20090417_AA)
JCL  - 20090529_01

The example output is taken from an IBM Java 6 SR5 installation on 32-bit Windows that has update 56789.001.866_FIX_1 applied.

Restoring changes applied by the Update Installer for Java

Removing an update from a Java installation

Remove an update from a Java installation using the -remove UpdateName option, where UpdateName is the test fix or debug module name. The tool uses the information stored in the JUIUpdateData.xml file, and the backup created during updating, to complete the process.

If you try to remove an update that depends on another update, a warning message is issued. In this situation you must remove all the updates from the Java installation using the -remove all option.

Known limitations

The following topics are known limitations of the Update Installer for Java:

Updating the JRE used to run the Update Installer for Java
JREs might be flagged as corrupt after updating

If you still experience problems with the Update Installer for Java after reviewing these known limitations, see Debugging problems with the Update Installer for Java.

Updating the JRE used to run the Update Installer for Java

Attempting to install or remove an update for the JRE that is running the Update Installer for Java can result in the following error message:

java.io.FileNotFoundException: C:\pwi3260sr8-20100409_01-sdk\sdk\jre\bin\j9gc24.dll (The process cannot access the file because it is being used by another process.)
        at java.io.FileOutputStream.(FileOutputStream.java:179)
        at java.io.FileOutputStream.(FileOutputStream.java:131)
        at com.ibm.jui.juiUtil.JUIFileUtil.copyFile(JUIFileUtil.java:84)
        at com.ibm.jui.juiImpl.Update.installUpdate(Update.java:464)
        at com.ibm.jui.juiImpl.Update.install(Update.java:119)
        at com.ibm.jui.JavaUpdateInstaller.parseArguments(JavaUpdateInstaller.java:202)
        at com.ibm.jui.JavaUpdateInstaller.main(JavaUpdateInstaller.java:40)
To avoid this problem, run the Update Installer for Java with a different SDK or JRE. If you do not have another SDK or JRE available, duplicate the JRE you are using to run the Update Installer for Java.

JREs might be flagged as corrupt after updating

If you update a JRE using SMP/E on z/OS or installp on AIX, the SMP/E or installp utilities might flag the JRE as corrupt or inconsistent. This message is expected because you have modified the JRE.

Debugging problems with the Update Installer for Java

If an error occurs during the update process, the tool attempts to revert the changes it has made. All actions that the Update Installer for Java takes while updating or restoring the SDK are logged to a file JUIError.log in the tool installation directory. You should review this file to help with problem determination.