According to JLS §12.7 a class can be unloaded once its class loader can be reclaimed by Garbage Collection. This works in my implementation of a dynamic class loader. However, I would like to know for sure when a class has been unloaded by the GC. Can I force the GC to reclaim unused class loaders and would that simultaneously unload its previously loaded classes?
Incosistent GC behavior could cause some problems in my code.