What is the Bootstrap class loader in Java?

Class loader

A class loader dynamically loads classes on demand into the Java Virtual Machine (JVM). Since there is no linking at compile-time in Java, a class loader finds the binary representation of a class instance with a specific name and then creates that class. The ClassLoader class is an abstraction of a class loader.

Note: To know more about the ClassLoaderclass, refer to the official documentation.

Types of class loaders

There are three built-in ClassLoader types in Java, listed in order of priority:

  1. Bootstrap

  2. Extension

  3. System

This Answer will focus on the first type—the Bootstrap ClassLoader.

Class loaders in Bootstrap

The Bootstrap ClassLoader, also known as the Primordial ClassLoader, is a chunk of machine code that loads the internal classes of the Java Development Kit (JDK), which implements the Java specifications. Unlike other class loaders, this is not a Java class. Instead, it is platform-specific and begins the entire class loading process.

The Bootstrap ClassLoader also ensures that the basic code to support Java Runtime Environment (JRE) is loaded, including essential classes in the java.util and java.lang packages. It loads these classes from the location rt.jar, which contains all of the compiled class files for the JRE. This is referred to as the Bootstrap classpath and can be represented as such:

The Bootstrap classpath

Note: To know the differences between JDK, JRE, and JVM, please refer to this Answer.

Principles of functionality

These are the rules or principles that the class loaders in Bootstrap follow.

Delegation hierarchy

The delegation hierarchy model determines the priority of the Bootstrap ClassLoader, and each type of ClassLoader, except for the Bootstrap, which has a reference to its parent ClassLoader. The diagram below illustrates this hierarchy:

The delegation hierarchy model showing the priority of ClassLoaders

Visibility

According to this principle, the classes loaded by the children class loaders are visible to their parent classes. However, the same is not true the other way around. Therefore, any class loaded by the Bootstrap ClassLoader will not be visible to the Extension or System class loaders.

Uniqueness

This principle ensures that all the loaded classes are unique and there is no repetition. For instance, if the parent class loader loads a class, it will not be loaded again by the child class loader.

Free Resources

Copyright ©2025 Educative, Inc. All rights reserved