I'm trying to track down what looks like a memory leak problem in an application, but I'm having a hard time getting a list of the loaded classes as per what's displayed from the JMX "LoadedClassCount" attribute value in java.lang.ClassLoading.
That value shows some 28million classes loaded and steadily increasing (thus the leak). But when doing any analysis of the heap dumps in either VisualVM or MAT neither show anywhere close that that number for loaded classes.
VisualVM reports 11,788 totals classes (unless this isn't the same as total loaded classes), with 2.5mill instances. VisualVM does show classes with 0 instances, it just doesn't seem to show the same number as what the JMX attribute reports.
Other than something like (How can I get information from JVM about what classes are loaded along with the specs of all the loaded class?) Is there a way to get an output of what those 28mill loaded classes are, preferably from the heap dumps?