Java VisualVM无法检测到本地java程序 的 解决办法

来源:互联网 发布:单代号搭接网络计划 编辑:程序博客网 时间:2024/05/16 08:25

官方描述及解答:
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. Locally running Java applications are displayed as <Unknown Application> (pid ###).
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为具体的用户名,区分大小写)。


%TMP%:%TMP%为用户环境变量,在cmd下echo %TMP%可以查看具体路径,或者直接在地址栏输入%TMP%直接进入文件目录。
username:cmd下echo %USERNAME%即可查看用户名。

原创粉丝点击