This error is thrown by the Java Virtual Machine when an exception occurs in the static initializer of a class. You can use the getException( ) method to obtain the Throwable object that was thrown from the initializer. In Java 1.4 and later, getException( ) has been superseded by the more general getCause( ) method of the THRowable class. Figure 10-22. java.lang.ExceptionInInitializerErrorpublic class ExceptionInInitializerError extends LinkageError { // Public Constructors public ExceptionInInitializerError ( ); public ExceptionInInitializerError (String s ); public ExceptionInInitializerError (Throwable thrown ); // Public Instance Methods public Throwable getException ( ); default:null // Public Methods Overriding Throwable 1.4 public Throwable getCause ( ); default:null } |