Java VisualVM hangs connecting to locally process launched from eclipse

前端 未结 7 1361
耶瑟儿~
耶瑟儿~ 2020-12-08 18:59

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

相关标签:
7条回答
  • 2020-12-08 19:22

    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!

    0 讨论(0)
  • 2020-12-08 19:24

    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...

    0 讨论(0)
  • 2020-12-08 19:26

    Try to add the following VM arguments to your "Run Configurations":

    -Djava.rmi.server.hostname=localhost
    

    0 讨论(0)
  • 2020-12-08 19:32

    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?).

    0 讨论(0)
  • 2020-12-08 19:35

    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?

    0 讨论(0)
  • 2020-12-08 19:39

    add the follwing argument in eclipse runConfigurations augments tab

    -XX:+StartAttachListener

    this will allow visualVM to connect instantly and sample and profiling will work.

    0 讨论(0)
提交回复
热议问题