Unix systems have
.so files. Windows systems have DLLs. As far as the JVM is concerned, all programs are dynamically linked. Each class is loaded one at a time, and new classes are loaded as needed. This provides uniform access to all features, without having to trouble the programmer about what is loaded dynamically and what isn't.
The heart of the JVM's ability to load
class files dynamically is the class
java.lang.ClassLoader. In this chapter, we discuss how the
ClassLoader works and how you can build your own (and why you might want to). Though class loaders are intimately tied to
class files, it is rarely necessary to write the class loader itself in Oolong. Throughout this chapter, we use the Java language to write ...