Java Reference
In-Depth Information
Figure 13.2. Basic class-loader structure for Java applications
Class loaders in Java follow a parent-first model when attempting to resolve a class. This
means no matter what class loader you're in, the class loader will first ask its parent if it
can load the class. If the parent can't load the class, the parent will ask its parent and so
on until the bootstrap class loader is reached. If the bootstrap class loader can't load the
class, you get a java.lang.ClassNotFoundException . Once a class is found and
loaded, the class loader stores it in a local cache for quick reference. Now that you've had a
quick refresher on basic class loading, let's look at how class loading gets a bit more com-
plicated in Java EE applications.
 
Search WWH ::




Custom Search