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
List: http://www.antlr.org:8080/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org:8080/mailman/options/antlr-interest/your-email-address
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"il-antlr-interest" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/il-antlr-interest?hl=en
-~----------~----~----~----~------~----~------~--~---