liveBook · Manning

Class loader

Also called ClassLoader

A class loader is a JVM component that locates, loads, links, and defines classes for a running application.

How 2 Manning books explain it

100 Java Mistakes and How to Avoid Them

A class loader is a JVM component that locates, loads, and defines classes, with the defining loader contributing to a class's runtime identity.

How it is used
Diagnoses ClassCastException failures caused by duplicate class definitions in modular or plugin-based applications.
How deep it goes
Explains class identity, custom loading, parent-first delegation, and the resulting cast failure through a focused example.
Examples
Uses a second MyClass definition, instanceof, a cast, URLClassLoader, and the resulting exception message.
What you can do after
Diagnose loader-related cast failures and choose parent loaders more carefully when loading classes dynamically.

Read how 100 Java Mistakes and How to Avoid Them explains class loader →

Spring in Action, Sixth Edition

A class loader is a JVM component that loads Java classes and other resources into a running application.

How it is used
Uses class loaders to support faster automatic application restarts during development.
How deep it goes
Explains two class loaders and selective reloading, but stops short of JVM loading internals.
Examples
Uses changed Java code, property files, project resources, and dependency specifications to demonstrate reload behavior.
What you can do after
Diagnose why project edits reload automatically while dependency changes require a hard restart.

Read how Spring in Action, Sixth Edition explains class loader →

Also covered in

Related concepts

Questions about class loader

What is class loader?

A class loader is a JVM component that locates, loads, links, and defines classes for a running application.

Which Manning books explain class loader?

100 Java Mistakes and How to Avoid Them and Spring in Action, Sixth Edition.

What kinds of class loader are there?

Kinds of class loader include custom class loader and clojure.lang.DynamicClassLoader.

What is class loader also called?

Class loader is also called ClassLoader.

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.