unload a class

What is the command to unload a class @ runtime...(the opposite of Class.forName.)
[89 byte] By [sanju_76] at [2007-9-30 17:32:30]
# 1
For what purpose? What would be gained?just set the classes variable to null.
Martin3 at 2007-7-6 13:55:42 > top of Java-index,Administration Tools,Sun Connection...
# 2

> What is the command to unload a class @ runtime...(the

> opposite of Class.forName.)

There is none.

If you want to reload a class then you need to do the following.

- The class must be loaded via a custom class loader.

- All instances of the class, the class itself and the class loader must be available for collection. (This generally is handled via a proxy interface.)

- Reloading the class then involves nothing more than creating a new class loader and reconnecting the instances (in a proxy.)

jschell at 2007-7-6 13:55:42 > top of Java-index,Administration Tools,Sun Connection...