I would like to know if the JVM normally unloads classes in order to decrease the PermGen space. So here my questions:
- Do Java classes ever get unloaded by default from a JVM?
- Does closing a Jar classloader unloads all the loaded classes from that jar?
- What commands/ways should be used to allow the unloading of classes?
FYI, I did try some of the solutions on the web but none of them answered my questions. (for example: What does JVM flag CMSClassUnloadingEnabled actually do?)
PS: I am referring to Java 6 + hibernate (The class loading is handled by hibernate)