我目前正试图在 java web/soap 应用程序中寻找/一些内存泄漏,因此我想在 IntelliJ 中使用带有插件的 VisualVM。
我使用的环境:Windows 10 1607 14393.2248 Java 1.8.0_121 VisualVM 1.4.1
起初安装后它曾经工作过。
但现在它停止工作 - 弹出错误消息:
Error: Local Java Applications Cannot Be Monitored
Please see the VisualVM Troubleshooting Guide for more information and steps to fix the problem.
https://visualvm.github.io/troubleshooting.html#jpswin2
那里说:
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.
我的用户名包含大写字母,但目录也是大写字母(区分大小写) - 所以我没有看到任何问题。由于没有进一步的日志,我也不知道下一步该往哪里挖掘。有人知道我如何让 VisualVM 再次工作吗?
退出所有 java 应用程序和 delele%TMP%\hsperfdata_username
目录。一旦您启动任何 Java 应用程序,它将再次重新创建。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句