[antlr-interest] site back up

Dennis Benzinger Dennis.Benzinger at gmx.net
Thu Sep 4 05:24:12 PDT 2008


Hi!

Am 26.08.2008 03:10, Terence Parr schrieb:
> Back up...another case of HomePage.class reference in Java not  
> executing static initializer...i have to use new HomePage() dummy load  
> to get it to exec static {...}  Weird...i pushed .class files compiled  
> with 1.5 and it broke.  3 hours down the drain.  grrrrrrrrrrrrrrrrrr!
> [...]

I googled a bit and found out that the Java Language Specification never
promised that HomePage.class would initialize the class. It just worked
by coincidence in Java 1.4. This change between version 1.4 and version
5 is documented on http://java.sun.com/j2se/1.5.0/compatibility.html in
section "Incompatibilities in Java 2 Platform Standard Edition 5.0
(since 1.4.2)", item 5. This document also contains two workarounds for
the problem.

HTH,
Dennis Benzinger


More information about the antlr-interest mailing list