Re: ExceptionInInitializerError: NullPointerException



Roedy Green wrote:
> On 1 Oct 2005 12:03:05 -0700, "Shin" <bxin@xxxxxxx> wrote or quoted :
>
> >If the class it tries to load has an eagerly initialized static field
> >which depends on another class's lazily initialized field.
>
> Can you explain the mechanism of the problem is a little more depth?
>
> I could see a big problem if class A used class B's lazily initialised
> static that did not initialise until a B object was created, but that
> would be a bug always, not just when RMI were involved.

It doesn't depend on allocating objects of B. But, if the
initialization of B's static field depends on executing from "main"
method (normally, it's the case), you got the same effect.

-Shin

.



Relevant Pages

  • Re: Initialising a ArrayList directly
    ... > I was wondering why there is no way to initialise an ArrayList or ... static field, do this: ... If it's an instance field, ... And if it's a local variable, just write the initialization code right ...
    (comp.lang.java.help)
  • LISA
    ... In MS Fox Pro gibts das Lisa Prinzip = Load, Initialise, Activate ... In VS gibts ja nur Load, und anschließend Activate. ... wann werden diese Methoden und in welcher Reihenfolge geladen? ...
    (microsoft.public.de.german.entwickler.dotnet.csharp)
  • Re: Override static derived variable
    ... > actually references Derived.GetVar in the IL, ... > need to initialise the Derived class. ... I'll add a bit to Jon's reply since I know you have a Delphi background. ... ..NET does NOT load a class until it is ACTUALLY used. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Runtime errors on certain machines - HELP!!!
    ... When you're loading a Form using "Load" then only the Initialise and Load events will trigger, but any code in either of those events might cause them to trigger in a different order and might also cause other Form events to also trigger, depending on the code. ... try placing Exit Sub as the very first line in both the Load and the Initialise events of frmMain. ...
    (microsoft.public.vb.general.discussion)
  • Best Windows based dvd player?
    ... Have downloaded a trial of Intervideo's Windvd7, but it's just too big, and ... takes too long to load and initialise. ... I'm running DVD Region Free + Css to get round the limited ...
    (uk.media.dvd)

Loading