Read this technote to understand the options for updating Java SDKs on IBM i platforms with Daylight Saving Time (DST) changes.
DST changes and IBM i systems
When DST changes are announced, Java applications that are sensitive to time and date information need updating to ensure that all relevant time and date calculations are correct. To decide when to update your IBM i systems, read Guidance on Upgrading Java SDKs and JREs for Daylight Saving Time (DST) changes
For your Java applications to work correctly with new DST updates, you must update both your operating system and your Java SDK and JRE. Information about updating the IBM i operating system is provided in Installing, upgrading, or deleting IBM i and related software.
Updating Java SDKs using a PTF
The preferred way to update Java on IBM i is to use a Program Temporary Fix (PTF). You can find information about PTFs in Replacing Licensed Internal Code and IBM i of the same version and release.
Updating Java SDKs using the tzupatch tool for IBM i
If you need to apply a fix quickly and do not want to interrupt your standard patching processes, you can use the tzupatch tool to update Java. The tzupatch tool for IBM i updates Java SDKs on IBM i with DST changes that correspond to the tzdata levels described in Java SDK Olson time zone updates.
The tzupatch tool updates the time zone data on the following environments:
- The IBM® Technology for Java VM
- An up-to-date IBM i Classic VM
In all other cases, you must use a PTF to update your Java installation.
Obtaining the tzupatch tool
The tzupatch tool is included in the IBM Time Zone Update Utility for Java (JTZU) package that can be downloaded from the Java SDK Time Zone Update Utility page.
For a list of time zone updates that are included in the release, see Java SDK Olson time zone updates.
Using the tzupatch tool for IBM i
On IBM i, each supported version of the Java SDK is installed in a unique system-wide location. The tzupatch tool locates and updates any supported IBM i VMs.
Follow these steps to update your Java SDKs using tzupatch:
1. Sign on as a system administrator with *ALLOBJ and *SECOFR authorities.
2. Start an interactive QSH session using the STRQSH command from Command Entry.
3. At the QSH command prompt, use the cd command to change to the directory that contains <downloaded_file>, where <downloaded_file> is the file that you obtained from the Java SDK Time Zone Update Utility download page.
4. Type /usr/bin/jar -xf <downloaded_file> to extract the tool.
5. Run tzupatch using the tzupatch.qsh command and follow the on-screen prompts.
The tzupatch tool pauses and issues a warning message if it finds active Java applications on the system. Where possible, stop any jobs that are using Java before continuing with the update. If you continue, applications might behave unexpectedly until they are stopped and restarted.
Restoring changes made by the tzupatch tool
The tzupatch tool makes a backup of the original time zone data before updating your SDK. The backup file is <dir>/<name>.jar_tzupatchbackup_tzdata<old_version>, where:
- <dir> is the tzupatch install directory
- <name> is either "core" or "resources"
- <old_version> is the version of the time zone data found before the update (for example, "2006q").
Follow these steps to restore the original time zone data level:
1. Find the backup file for the change you want to revert; for example,*_tzupatchbackup_tzdata<old_version>.
2. Remove the patched file in that directory (core.jar, zi directory, or resources.jar).
3. Rename the backup file to its original name (core.jar, zi directory or resources.jar).
01 March 2021