IBM User Guide for Java V7 on Windows > IBM SDK for Java > Class loading
Custom class loaders
You might want to write your own class loader so that you can load classes from an alternate repository, partition user code, or unload classes.
There are three main reasons why you might want to write your own class loader.
- To allow class loading from alternative repositories.
This is the most common case, in which an application developer might want to load classes from other locations, for example, over a network connection.
- To partition user code.
This case is less frequently used by application developers, but widely used in servlet engines.
- To allow the unloading of classes.
This case is useful if the application creates large numbers of classes that are used for only a finite period. Because a class loader maintains a cache of the classes that it has loaded, these classes cannot be unloaded until the class loader itself has been dereferenced. For this reason, system and extension classes are never unloaded, but application classes can be unloaded when their class loader is.
For much more detailed information about the class loader, see http://www.ibm.com/developerworks/java/library/j-dclp1/. This article is the first in a series that helps you to write your own class loader.
Parent: Class loading
Error 404 - Not Found Error 404 - Not Found
The document you are looking for may have been removed or re-named. Please contact the web site owner for further assistance.