0Pricing
Java Academy · Lesson

ClassLoader Hierarchy and Custom Loaders

Understand bootstrap, platform, and application class loaders and write a custom ClassLoader.

The ClassLoader Hierarchy

The JVM uses a hierarchy of ClassLoaders. Each loader has a parent; before loading a class itself, it delegates to the parent (parent-first delegation model).

Bootstrap ClassLoader

The bootstrap ClassLoader loads core JDK classes (java.lang.*, java.util.*). It is implemented in native code and has no Java parent; getParent() returns null.

ClassLoader cl = String.class.getClassLoader();
System.out.println(cl); // null (bootstrap ClassLoader)

All lessons in this course

  1. Class Loading Phases: Load, Link, Initialize
  2. ClassLoader Hierarchy and Custom Loaders
  3. Inspecting Bytecode with javap
  4. JIT Compilation and Tiered Compilation
← Back to Java Academy