If you have relatively new JDK, you can find VisualVM from your JDK\bin folder. You can launch it from Eclipse with VisualVM Launcher. You cand find good instructions there but I added some pictures since some things did look a bit different in my IDE. I had some strange problems when I copied the files to my Eclipse installation folder and the right option in Preferences didn't show up. Make sure all the files go to right places.
Set up the VisualVM in Preferences. Remember to link to JDK, not JRE:
Add new Run Configuration:
You can choose the VisualVM as a launcher from the place I've circled:
And finally, this kind of results you may expect:




Which eclipse version is used for showing this snaps??
ReplyDeleteI'm pretty sure it was the latest version at the time (August 2011).
ReplyDeleteI use m2eclipse and rum my app using jetty:run from eclipse , in maven build, configration how can I add visualVM
ReplyDeleteSorry but if it doesn't work the same way, I don't know. I don't have experience with that.
ReplyDeleteYou can also run the VisualVM tool through the console as well. VisualVM automatically finds all local JVMs and you can use it to hook into remote JVMs as well. Just in case using through Eclipse is not an option.
ReplyDelete