선택 심화: class lifetime의 네 단계

핵심 과정을 마친 뒤 실패 단계를 loading·linking·initialization·use로 구분한다.

  1. Loading

    binary와 defining loader로 Class 생성

    identity
  2. Linking

    verify·prepare·resolve

    structure
  3. Initialization

    static initializer를 source order로 실행

    state
  4. Active use

    static field·method·new를 사용

    runtime

핵심: initializer 실패의 최초 cause를 보존해야 후속 NoClassDefFoundError를 설명할 수 있다.