Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Warning of class sharing doesnt allow me to profile locally (Windows) using visualVM

When I launch my java app from Eclipse Helios I see it in the list of local applications on the visualVM. However, I go to the Profiler tab and I can't profile either by CPU or Memory criteria.

I get the following message: "WARNING! Class sharing is enabled for this JVM. This can cause problems when profiling the application and eventually may crash it. Please see the VisualVM Troubleshooting Guide for more information and steps to fix the problem: https://visualvm.dev.java.net/troubleshooting.html#xshare."

In the eclipse launcher of my app, I added -Xshare:off to the VM_Arguments with no success. JDK Used: jdk 1.6.0_20 Enviornment: Windows 7, 64bit

Any advise? Thanks

like image 238
Tabcina Avatar asked Feb 08 '12 23:02

Tabcina


People also ask

How do I use VisualVM on Windows?

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 Profiler in VisualVM?

The Profiler tab of an application enables you to start and stop the profiling session of a local application. Profiling results are displayed in the Profiler tab. You can use the toolbar to refresh the profiling results, invoke garbage collection and save the profiling data.

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.


1 Answers

Does you Eclipse require UAC permission to run?? I bet it does...

Just run VisualVM as an Administrator so that they will run under the same user.

Cheers! Marco

like image 95
Marco P. Avatar answered Oct 03 '22 16:10

Marco P.