I\'m trying to connect jvisualvm installed with jdk1.7.0_04 to a locally running java process. When I do this, jvisualvm shows a progress bar in the bottom left saying its
Found this on a VisualVM mailing list: https://java.net/projects/visualvm/lists/users/archive/2016-06/message/7
Added this:
-J-Dorg.netbeans.profiler.separateConsole=true
to my jvisualvm.exe shortcut and it works!
I was experiencing the same problem and I am behind a proxy. Selecting either 'No Proxy' or 'Manual proxy settings' resolves the issue.
Such a simple thing, and I have wasted a couple of hours on this...
Try to add the following VM arguments to your "Run Configurations":
-Djava.rmi.server.hostname=localhost
In my case the solution was to use 32bit jsdk.
To diagnose start jvisualvm with param --trace ..
my log contained:
Cannot load C:\Program Files\Java\jdk1.7.0_45\jre\bin\server\jvm.dll. %1 is not a valid Win32 application. (193)
Falling back to running Java in a separate process; DLL cannot be loaded (64-bit DLL?).
Sometimes Skype sits on weird ports... This has caused me major headaches on at least two occasions, when it chose 8080, and I thought my Tomcat is corrupted. It turned out (after an hour or so of being totally clueless and unsuspecting), that Skype was using that port...
Also a question: did you start your program in 'Run' or 'Debug' mode from Eclipse?
add the follwing argument in eclipse runConfigurations augments tab
-XX:+StartAttachListener
this will allow visualVM to connect instantly and sample and profiling will work.