It’s hard to put a label on VisualVM – it has a profiler, but it’s more than that. It also has tools for tracking threads, interacting with garbage collection, and monitoring memory and CPU usage.
What you might not realise is that you almost certainly have VisualVM installed – it’s been included as a standard part of the JDK since Java 1.6 update 7. Further to this, it’s actually an evolution of Netbeans’s profiler, which was first introduced in 2004.
All of the major IDEs used by Java developers – with the exception of Netbeans due to its integrated profiler – can quickly be set up to use VisualVM. So here’s how to do it for IDEA and Eclipse.
To set up VisualVM in Idea, first download the VisualVM Launcher jar. Open up the plugins settings page and install it by selecting ‘Install plugin from disk’.
Relaunch Idea and go to the new VisualVM Launcher settings page. Set the path to your jvisualvm.jar file which should be in your JDK’s bin folder.
Idea will now have buttons for launching or debugging with VisualVM.
Download the VisualVM launcher for Eclipse and extract it to a location of your choosing. Launch Eclipse and click ‘Help’ -> ‘Install New Software…’.
Click ‘Add..’, fill in a name and then click ‘Local’. Find your VisualVM launcher folder and select it.
If you now return to the Install Software dialog you should see the launcher feature available to install. Select it and hit Next.
Follow the instructions on screen and Eclipse will restart. If you now edit your run configuration you will see that multiple launchers are available – select the VisualVM launcher and you’re good to go.
Latest posts by Sam Howard (see all)
- Music and Coding Part 3: How to listen to music - August 27, 2014
- Music and Coding Part 2: What to listen to? - August 6, 2014
- Music and Coding Part 1: Why listen while you work? - July 16, 2014
- 3 Reasons why we don’t convert Type 1 glyphs to TrueType - June 25, 2014
- Web fonts: What’s next for typography online? - June 5, 2014