Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
student:eclipse:visualvm_install [2020/12/31 12:02] – created bernstdhstudent:eclipse:visualvm_install [2020/12/31 14:30] (current) bernstdh
Line 2: Line 2:
  
 Note: These instructions assume that you have already [[student:java:profiling|downloaded and installed the VisualVM]]. Note: These instructions assume that you have already [[student:java:profiling|downloaded and installed the VisualVM]].
 +
 +===== Installing/Configuring the Plugin =====
  
   - Download the %%.zip%% file containing the plugin from [[http://visualvm.github.io/idesupport.html|the IDE integration page]].   - Download the %%.zip%% file containing the plugin from [[http://visualvm.github.io/idesupport.html|the IDE integration page]].
Line 10: Line 12:
   - Expand the tree and select "Visual VM Launcher Feature".   - Expand the tree and select "Visual VM Launcher Feature".
   - Click on <key>Next</key> and complete the installation.   - Click on <key>Next</key> and complete the installation.
 +  - Click on <key>Window>+<key>Preferences</key> or <key>Eclipse>+<key>Preferences</key> (depending on your OS), expand "Run/Debug", expand "Launching", and select "VisualVM Configuration".
 +  - Enter the path to the "VisualVM Executable" and, if necessary, the JDK (not the JRE) you are using.
 +  - Click on <key>Apply and Close</key>.
 +
 +
 +===== Using the Plugin =====
 +
 +To run an application with the VisualVM you need to create a fun configuration for your project.
 +
 +  - Select the project.
   - Click on <key>Run</key>+<key>Run Configurations...</key>.   - Click on <key>Run</key>+<key>Run Configurations...</key>.
   - Select "Java Application" and click on the new configuration button.   - Select "Java Application" and click on the new configuration button.
-  - Enter "VisualVMfor the "Name:".+  - Enter an appropriate name (e.g., "Profile MyApplication"). 
 +  - Enter the name of the main class.
   - Next to the message about "Multiple launchers available", click on "Select one...", select "Use configuration specific settings", select "VisualVM Launcher", and click on <key>OK</key>.   - Next to the message about "Multiple launchers available", click on "Select one...", select "Use configuration specific settings", select "VisualVM Launcher", and click on <key>OK</key>.
-  - Click on <key>Apply</key> and <key>Close</key>.+  - Click on <key>Run</key>
 + 
 +At this point, the application should start executing, the VisualVM should start executing, the appropriate application should be selected, and you should be able to begin profiling. For help, with profiling, see the page on [[student:java:profiling|profiling java programs]].