author and iconoclast
posted 14 years ago
To unload a class, first you have to load the class using a ClassLoader you created -- i.e., not the built-in one. Then to unload a class, make sure there are no instances of the class that are reachable, and then dispose of that ClassLoader. The class itself is now eligible for garbage collection.