// one way to trigger an ExceptionInInitializerError private static final int a; static { // someMethod throws some sort of Exception a = someMethod(); }