Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run VisualVM Eclipse Plugin

I am trying to run Visual Plugin in Eclipse Juno. Visual VM usage instructions are confusing. Running my application on Tomcat server and I have no idea how to point it to Visual VM.
Usage Instructions:

  1. Create a new application configuration
  2. Choose the "VisualVM Launcher" as the application launcher
  3. Run/Debug the application with the created configuration to have VisualVM started automatically.

How would I choose Visual VM Launcher for my application which is running on Tomcat?

like image 958
Himanshu Yadav Avatar asked May 16 '13 12:05

Himanshu Yadav


People also ask

How do I run VisualVM?

You can access VisualVM from the bin directory of the JDK: On a Windows system, start VisualVM by double-clicking jvisualvm.exe. You can also select VisualVM from the Start menu (if Windchill shortcuts are installed). On other systems, start VisualVM by invoking the jvisualvm script.

What is VisualVM executable?

What is VisualVM. It is a tool automatically available after JDK is installed. The executable file could be found on your <JDK installation folder>/bin as displayed below. In order to measure the performance of your application, it is necessary for the application to be recognized by VisualVM first.

How do I add VisualVM to STS?

Installation: download the plugin (. zip, 68.1KB), unzip it and add as a local update site, then install the VisualVM Launcher Feature. Configuration: setup the plugin by configuring path to JDK (not JRE) and VisualVM installation using Run/Debug-Launching-VisualVM Configuration.


1 Answers

The VisualVM plugin for Eclipse is only useful when you can start the application from within Eclipse (i.e. when it's a plain Java application, not Tomcat or something that is to be deployed in Tomcat).

In your case, just start jvisualvm (which you can find the same folder as javac) and select the Tomcat process in the dialog.

Note that you may have to configure Tomcat to allow VisualVM to connect.

Alternatively, you can create a launch config for Tomcat but to do this, you will have to read the startup files, collect all JARs that have to go into the classpath manually and correctly, collect startup parameters, use the correct "current directory", set a couple of system properties ... it's possible but you probably don't want to try.

like image 68
Aaron Digulla Avatar answered Oct 03 '22 00:10

Aaron Digulla