2.4. The Class Loader Rules

Implicit class loading provides simplicity, and explicit class loading provides flexibility. However, these mechanisms must have some additional properties to deal with the tricky issue of class visibility. What communication should be possible between classes loaded by two different class loaders? The simple answers to this question have undesirable properties: If there is no communication across class loader boundaries, then there is no real benefit to dynamic class loading, and separate class loaders might just as well be separate virtual machines. On the other hand, complete visibility between class loaders leads to chaos, as there is no way to hide conflicting names or versions from each other. So, the class loader ...

Get Component Development for the Java™ Platform now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.