Is there a way to unload my .class files rogramatically ???
I want to unload a class then reload it, i know how to load, but is there a way to unload then reload ???
Thanks in advance ...
SCJP 5.0, SCWCD 1.4, SCJA 1.0
posted 8 years ago
No, you can't unload a class.
If a class was loaded by a ClassLoader other than the main system class loader, the class will be garbage-collected along with the ClassLoader, when there are no more references to any classes from that ClassLoader.
While you cannot unload a class, you can load a new copy of the class, using a new ClassLoader. That's what people in your situation usually do. It is not trivial to get correct, however.
Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.