Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Remote Monitor Classes Loaded  RSS feed

 
Dave Peterson
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Using jconsole, I can see that my remote application has 2500 classes loaded which seems unusually high to me. Can someone suggest a way that I can see what the actual classes loaded are?
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 37228
519
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dave,
Welcome to JavaRanch! As with many things, the first thing to do is look at a profiler to see what's actually going on.
 
Dave Peterson
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Suggestions on a profile tool that:
1. remote attach to a production server that has a problem (i.e. I can't just leave a profiler running against a production server waiting for problem to occur).
2. eclipse plugin would be nice since that is our IDE of choice
 
Peter Johnson
author
Bartender
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you using JDK6? Is so, you can use VirtualVM to see which objects are currently allocated - that should give you a listing of the classes loaded.

And no, 2500 classes is not unusual, especially if you are using a frameworks or lots of libraries.

Oh, another thought: you can set the -verbose:class JVM argument - the JVM will then print out each class loaded and the JAR file it was loaded from (if not from rt.jar). This argument works on all versions of the JVM.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!