Date: Sun, 19 Jun 2011 22:54:49 +0200 From: Jilles Tjoelker <jilles@stack.nl> To: freebsd-java@freebsd.org Subject: java timezone data files Message-ID: <20110619205449.GC69133@stack.nl>
next in thread | raw e-mail | index | archive | help
Various Java ports want a "tzupdater" from Sun/Oracle which can be annoying to download. I noticed that Ubuntu/Debian do not need this tzupdater and have a package with timezone data files for Java. It turns out that these files can be generated on FreeBSD as well. A page about the Debian package is at http://packages.debian.org/sid/tzdata-java The interesting part is the .debian.tar.gz tarball in the "Download Source Package" section, for example http://ftp.de.debian.org/debian/pool/main/t/tzdata/tzdata_2011g-1.debian.tar.gz This contains a patch debian/patches/java.diff with additional files that Java needs and a file debian/rules which says how to build it. The original source simply contains what we have in head src/contrib/tzdata, plus three files solar87, solar88 and solar89. I am using openjdk6 because Debian also uses it for this purpose. Unfortunately, the port does not install javazic.jar but it is in the work directory as build/bsd-i586/btjars/javazic.jar . After copying our tzdata to a temporary directory and applying Debian's java.diff to it, the following command creates the data files (in tzgen-java/): java -jar \ /usr/ports/java/openjdk6/work/build/bsd-i586/btjars/javazic.jar \ -V 2011g -d tzgen-java \ africa antarctica asia australasia europe northamerica southamerica \ etcetera factory backward systemv pacificnew \ gmt jdk11_backward This gives a few error messages but generates files. These files are quite similar to those in /usr/local/jdk1.6.0/jre/lib/zi and Europe/Amsterdam even matches exactly. Replacing the files, java from jdk1.6.0 still appears to work correctly, although I do not know how to test this more thoroughly. -- Jilles Tjoelker
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110619205449.GC69133>