Any java class that is run on a computer, runs in a JVM. Can I see the classes (Class names and their method names) that have been loaded or run in a JVM? The java console can be used only to see the messages that have been printed by System.out or System.err . I want to see the classes that have been executed in the JVM. Something like a call stack. Are there any Java api to acheive this?
Nirmal Kumar<br />If you have to aim, aim for the moon. Even if you miss you will land among the stars
JConsole, which comes with Sun's JDK 1.5.0, may tell you some of what you need to know. If you want to know what methods were invoked throughout a program's execution, you will probably need something like Borland OptimizeIt, which has a code coverage component.
Use the -verbose parameter to print classnames upon load :
java -verbose Myclass
"Twenty years from now you will be more disappointed by the things that you didn't do than by the ones you did. So throw off the bowlines. Sail away from the safe harbor. Catch the trade winds in your sails. Explore. Dream. Discover." - Mark Twain