There are a few JVM querying tools out there.
For what you want to do, I'd try JMP - it's free and simple. I've had limited success with it - it seems to work OK for small programs, but I was unable to profile a larger (1000 class / 500k line)
J2EE app. I'm using Java 1.3.1 so that may play a part.
Anyway, you can get JMP from
http://www.khelekore.org/jmp/. Installation wasn't too difficult, and the end result is you do java -Xrunjmp MyMainClass to get a few windows with stats about classes loaded, methods called etc.
On a side note, if anyone has had success on bigger projects with any free profilers I'd be keen to hear from them.
Hope this helps.
--Tim