jvisualvm 检测不到本地java程序

cmd:

echo %TMP%

echo %USERNAME%

官方描述及解答:

Local Applications Cannot Be Monitored (Error Dialog On Startup)

        Description: An error dialog saying that local applications cannot be monitored is shown immediately after VisualVM startup. 

        Resolution:  This can happen on Windows systems if the username contains capitalized letters. In this case, username is UserName but the jvmstat directory created by JDK is%TMP%\hsperfdata_username. To workaround the problem, exit all Java applications, delete the %TMP%\hsperfdata_username directory and create new %TMP%\hsperfdata_UserName directory.
        即:把%TMP%\hsperfdata_username文件删除,重新建立%TMP%\hsperfdata_UserName文件(username为具体的用户名,区分大小写)。

username 即当前电脑的用户名 用 echo %USERNAME% 可以查看

同时看下磁盘

 

右键:以管理员的方式运行

 

最后的结果:

 

posted @ 2017-11-20 16:27  超人吃鸡蛋  阅读(1430)  评论(0)    收藏  举报