Search code examples
javaclassloader

Number of classes loaded in java


I have program that the number of classes loaded there is constantly rising.

How could this actually be ? Or do i misunderstand something in java about classloading?

Here is a snippet from jConsole overnight :

alt text http://img200.imageshack.us/img200/200/classesp.jpg

Could someone please tell me what could be the possible reason for such a constant classloading growth ? Or is this normal ?

Thanks


Solution

  • What sort of features does your application have that are out-of-the-ordinary as regards class loading? For example:

    • are you constantly loading classes from remote sources (e.g. RMI)?
    • are you using your own ClassLoader?
    • are you using the Java Proxy mechanism to create classes on the fly?