Profiling the Java application
- Run jvisualvm from the
<JDK_HOME>/binfolder:

Figure 11.1: Java VisualVM profiler
VisualVM lists all the Java processes that can be profiled by it on the local machine under the Local node. You can see VisualVM itself listed along with Eclipse.
- Once you run the
CourseManagementapplication, the process should also show up underLocal:

Figure 11.2: The CourseManagement application available for profiling
- Double-click on the process (or right-click and select
Open). Then, go to theProfiletab and click on theCPUbutton:

Figure 11.3: VisualVM Profiler tab
You should see the status set as profiling running.
- After starting CPU profiling, if you get an error such as
Redefinition failed with error 62, try running the application with the-XVerify:noneparameter. In Eclipse, select theRun|RunConfigurationsmenu and then select theCourseManagementapplication under theJava Applicationgroup. Go to theArgumentstab and add-Xverify:nonetoVM arguments. Run the...