Explores the intricate startup sequence of the Java Virtual Machine, from command invocation through JNI_CreateJavaVM() to class loading, linking, and initialization. Covers system resource detection, garbage collector selection (G1 GC by default), Class Data Sharing (CDS), metaspace creation, and the three-phase class linking process (verification, preparation, resolution). Discusses optimization techniques including Project Leyden's Ahead-of-Time compilation features in JDK 24, which aims to reduce startup time by performing class loading and linking operations ahead of time rather than at runtime.
Table of contents
1. Overview2. From java Command to JVM Launch3. Loading, Linking, and Initialization4. Optimizing JVM Startup Performance5. ConclusionSort: