[antlr-interest] site back up

Dennis Benzinger Dennis.Benzinger at gmx.net
Tue Aug 26 11:27:44 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 {...}
> [...]

Static initializers are executed when the class is initialized. See
http://java.sun.com/docs/books/jls/third_edition/html/classes.html#8.7

When a class is initialized is described in detail in
http://java.sun.com/docs/books/jls/third_edition/html/execution.html#12.4.1

Simply referring to HomePage.class will not initialize the class.

HTH,
Dennis Benzinger


More information about the antlr-interest mailing list