I’m always using an IDE with this sort of analysis capability built in. But this might be useful for spot checks on the operational system once the code leaves development.
Today we will show a pretty useful program which is a part of Java JDK but whose existence is not known to many Java programmers. It’s named jconsole and it is a GUI client for accessing Java Management Extensions (JMX). In short, it allows you to view a lot of data about memory usage, running threads, garbage collector performance and much more other useful runtime informations about any Java process running on your machine.