I have tried many code examples where I generally do
String[] IDs = java.util.TimeZone.getAvailableIDs();
and it does not work. I also tried another sample code frame, i.e. this and it returns:
at sun.util.calendar.ZoneInfoFile.getZoneIDs(ZoneInfoFile.java:785)
at sun.util.calendar.ZoneInfo.getAvailableIDs(ZoneInfo.java:560)
at java.util.TimeZone.getAvailableIDs(TimeZone.java:508)
at TimeZoneDemo.main(uu.java:6)
I also tried reinstalling the JRE and JDK, but the error persists. So what's the point? When I try to execute String[] eg = {"one","two"};, it works.
sleax source
share