Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm using Ubuntu 12.04 LTS and recently installed the openjdk-7-jdk using apt-get. For a while all seemed fine, but I realized one of my projects started to break with the following stack:

java.lang.NullPointerException
sun.util.calendar.ZoneInfoFile.getZoneIDs(ZoneInfoFile.java:790)
sun.util.calendar.ZoneInfo.getAvailableIDs(ZoneInfo.java:601)
java.util.TimeZone.getAvailableIDs(TimeZone.java:580)
mpeg.psi.TOT.parseMJD(TOT.java:136)

Googli'n around I've found other people with similar issues, pointing out to a bug in the tzupdater.jar tool from Oracle. Should'n be my case, but I tried the fix suggested, checking and messing with the permissions of "lrwxrwxrwx 1 root root 27 Set 20 08:59 /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/zi -> ../../../../../share/javazi" and running the tzupdater. Somehow I fixed it, but some later update broke it again.

I decided to go radical then:

$> sudo apt-get purge openjdk-6-jre openjdk-6-jre-lib  openjdk-7-jre-headless openjdk-7-jre-lib openjdk-7-jre openjdk-6-jre-headless java-common
$> sudo apt-get install openjdk-6-jdk ant jdownloader java-common
$> sudo apt-get install tzdata-java
tzdata-java is already the newest version.

Still buggy :(

Now I'm out of ideas. The code that breaks this is: TimeZone.getAvailableIDs(-3 * 60 * 60 * 1000); That is, I want to get GMT-3 to convert a set of numbers (hous, minute, day...) into a Date:

    gc.set(GregorianCalendar.YEAR, year);
    gc.set(GregorianCalendar.MONTH, month - 1);

Any tip on how to fix the Java TZ or how to bypass the issue on the java code?

share|improve this question
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.