[JSR310 M7 Review request] 8007572: Replace existing jdk timezone data at <java.home>/lib/zi with JSR310's tzdb.

Xueming Shen xueming.shen at oracle.com
Thu Mar 14 02:51:45 UTC 2013

This should have been addessed via

JDK-8008348 *The leftover jdk/make/tools/javazic causes build problems 
with hs25-b19 control job* <https://jbs.oracle.com/bugs/browse/JDK-8008348>


On 3/13/13 7:19 PM, Andrew Hughes wrote:
> ----- Original Message -----
>> The build part of this review looks good to me.
> Judging by this changeset, I gather javazic is no longer being run.
> If so, why is the source code being retained in the tree?  It means
> that a build of OpenJDK against itself now fails.  The new
> build system currently finds the javazic source code and tries to compile it,
> but fails because ZoneInfoFile.java has changed and Gen.java can no longer
> compile against it.  Deleting the javazic source code fixes the
> build.
> Any reason not to commit this?
> http://cr.openjdk.java.net/~andrew/build/javazic/webrev.01/
>> /Erik
>> On 2013-02-07 19:31, Xueming Shen wrote:
>>> Hi,
>>> 8007572: Replace existing jdk timezone data at <java.home>/lib/zi
>>> with
>>> JSR310's tzdb.
>>> Webrev:
>>> http://cr.openjdk.java.net/~sherman/8007572/
>>> Note:
>>> JDK/JRE has been using the time zone data at <java.home>/lib/zi for
>>> j.u.TimeZone since JDK 1.4.0 [1]. JSR310 has introduced in its own
>>> time zone data file/format <java.home>lib/tzdb.jar to provide the
>>> time
>>> zone data support for its new java.time date-time classes.
>>> So we now have two different time zone data files in different
>>> formats
>>> (though from the same time zone data source, Olson tz data, now the
>>> IANA
>>> Time Zone Datebase) to support two sets of date-time APIs
>>> (java.util
>>> date-time classes and java.time date-time classes) in one JDK/JRE,
>>> which
>>> definitely will add the maintenance burden going forward, given the
>>> fact
>>> that we will have to update/distribute the latest tzdb data in
>>> periodically [2].
>>> Also the current way the time-zone data is being
>>> distributed/installed
>>> (at <java.home>/lib.zi, as individual file for each time zone) has
>>> been
>>> a footprint concern for some configurations, especially the small
>>> embedded
>>> environment. The JEP151 [3] was originally submitted to propose to
>>> store
>>> the time-zone data more efficiently into a single compressed file.
>>> The
>>> JEP 151 has been withdrawn since, with the assumption that JDK 8
>>> may
>>> replace the "zi" data with the much smaller JSR310 tzdb data file.
>>> As indicated in JEP151, current installed "zi" directory probably
>>> takes
>>> up 1M of disk-space with the 0.5k default file-system-block-size.
>>> Even
>>> with the proposed "store in one single compressed file" approach,
>>> it will
>>> still take about 250K space for all tzdb data in "zi" directory.
>>> JSR310
>>> tzdb data file however is much smaller. It is around 40K for
>>> compressed
>>> and 100k uncompressed, for the same tz data.
>>> The proposed change is to share the JSR310 time zone data tzdb.jar
>>> with j.u.TimeZone by converting the JSR310 tzdb data completely
>>> (bits
>>> to bits compatible) at runtime into the internal data structure
>>> that
>>> j.u.TimeZone needs for its time zone data functionality/needs.
>>> Thanks!
>>> -Sherman
>>> [1] https://jbs.oracle.com/bugs/browse/JDK-4230123
>>> [2]
>>> http://www.oracle.com/technetwork/java/javase/tzupdater-readme-136440.html
>>> [3] http://openjdk.java.net/jeps/151

More information about the core-libs-dev mailing list