concept class loader in category java

appears as: class loaders, class loader, The class loader, class loader, class loaders
The Java Module System

This is an excerpt from Manning's book The Java Module System.

There’s no technical solution for this issue that doesn’t involve existing module systems or manually fiddling with class loaders. Build tools are generally able to detect this scenario. They may warn about it and usually resolve it with simple mechanisms like picking the most current version.

Figure 12.2 With layers, module graphs can be stacked, adding a third dimension to your mental model of the application. Because they don’t share class loaders, layers are well-isolated from one another. (Like every good computer science graph, this one may look upside down. Parent layers are below their children because that keeps the layer containing the platform modules at the bottom.)

c12_02.png

As you can see in figure 12.3, class loaders aren’t islands: each class loader has a parent, and most implementations, including the three just mentioned, first ask the parent to load a class before trying to look it up themselves. For the three boot-layer class loaders, boot is the parent-less ancestor, platform delegates to boot, and system delegates to platform. As a consequence, the system class loader has access to all application and JDK classes from the boot and platform loaders.