JVisualVM

JVisualVM is a tool that provides a visual interface for viewing detailed information about Java applications while they are running on a JVM. It is bundled with JDK 6 update 7 and later.

When you use JVisualVM, it is safest to use the -Xshare:off command-line option. This option disables class sharing, and if it is not used there is a possibility that the JVM being profiled may crash.

For more information, see http://docs.oracle.com/javase/8/docs/technotes/guides/visualvm/.