Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: time zone tool tzupdater for Apple's Java?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: time zone tool tzupdater for Apple's Java?




The tzupdater tool from Sun Microsystems can be downloaded at http://java.sun.com/javase/tzupdater_README.html

By setting the system property called "java.vendor", it can also be used to update Mac OS X's JREs:

   java -Djava.vendor="Sun Microsystems Inc." -jar tzupdater.jar -u

Details:
The following instruction are an example for the JRE 1.4.2, but those can also be used for 1.5.0 and 1.6.0. Close all Java applications, open a terminal and type ...


$ sudo bash
Password:

# whoami
root

# cd /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2

=> change to the directory where the JRE is stored which you want to update

# Commands/java -version
java version "1.4.2_09"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_09-232)
Java HotSpot(TM) Client VM (build 1.4.2-54, mixed mode)

=> the output tells us, that we have 1.4.2 installed

# Commands/java -Djava.vendor="Sun Microsystems Inc." -jar /tmp/tzupdater.jar -V
tzupdater version 1.0.0-b03
JRE time zone data version: tzdata2003a
Embedded time zone data version: tzdata2006p


=> by setting the expected property, the tzupdater also runs on Mac OS X. Our JRE time zone data is from 2003.

# Commands/java -Djava.vendor="Sun Microsystems Inc." -jar /tmp/tzupdater.jar -u

=> The update is done. For more/verbose options see the manual for the tzupdater at the java.sun.com homepage.

# Commands/java -Djava.vendor="Sun Microsystems Inc." -jar /tmp/tzupdater.jar -V
tzupdater version 1.0.0-b03
JRE time zone data version: tzdata2006p
Embedded time zone data version: tzdata2006p


=> The JRE time zone data has been updated to tz2006p

The tzupdater updates the Java timezone files in
/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/zi

In the example above, the tzupdater stores a backup in
/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/zi.tzdata2003a

To restore the time zone data do the old values, move the backup directory to the folder called zi.

# cd /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib
# mv zi zi.tzdata2006p
# mv zi.tzdata2003a zi

Before an time zone update or an time zone restore, close all Java applications.

Johann

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden




Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.