This might be a silly question,but is there a way to find loaded classes in a JVM. Particularly classes that are loaded in to tomcat? Thanks in advance.
Asked
Active
Viewed 1,945 times
2 Answers
2
You might want to use tools like YourKit or JProfiler to see the usage of classes on your server. Another option that comes to my mind is to use JVM Monitor plugin, if you're using Eclipse.

Dropout
- 13,653
- 10
- 56
- 109
-
1There are also [VisualVM](http://visualvm.java.net/) and [Java Mission Control](http://www.oracle.com/technetwork/java/javaseproducts/mission-control/index.html) which are distributed with the latest JDK. Look for jvisualvm.exe and jmc.exe on Windows. – Mustafa Ulu Dec 16 '13 at 15:43
1
If you run java with the -verbose:class
option, it will show what classes are being loaded - is that what you meant?
See also
Note also that the same classfile can be loaded into a single JVM by multiple classloaders; each one will be treated as a distinct class by the JVM.
-
I tried that command it only shows the classes relevant java itself. Not the user classes!. – Maxi Dec 16 '13 at 13:32
-
What I need is; suppose there is a class "foo.baa.Foo.class" in one of my jar in WEB-INF/lib in a *.war file. When my application is up and running is there a way to find that "Foo" class in actually loaded to the JVM or not. Or in other mean list all the class files that are loaded in to JVM. – Maxi Dec 16 '13 at 13:37
-