1) Hprof is one profiling tool that comes with JDK and it need a startup VM option during the application launch.
http://java.sun.com/developer/technicalArticles/Programming/HPROF.html Specify format as 'b' binary and you can visualize with Heap Analysis Tool(HAT) -->
https://hat.dev.java.net/ java -agentlib:format=b Application1
or java -XrunHprof:format=b Application1
2) Jconsole is also one more solution which helps to give you a picture of an appication objectheap/stack occupancy, CPU performance etc.
http://java.sun.com/developer/technicalArticles/J2SE/jconsole.html 3) Last but not the least is the JFluid that comes with Netbeans
IDE. Jfluid helps to connect to a running application and doesn't requires any VM option during the application startup.
http://profiler.netbeans.org/ Hope this Helps,
Arjun.