java 的hsperfdata_%USERNAME%文件夹不能自动生成原因解决
来源:互联网 发布:sql select null as 编辑:程序博客网 时间:2024/05/20 06:55
现象
使用jps不能查看java 的进程,使用visualVm不能监控到本地的java程序,并且提示"Local Applications Cannot Be Detected (Error Dialog On Startup)".
原因分析
java程序启动后,默认会在 %TEMP%/hsperfdata_%USERNAME% 目录下以该进程的id为文件名新建文件,并在该文件中存储jvm运行的相关信息,其中%TEMP%为wiondows系统的临时目录(在文件地址中输入"%TEMP%"即可跳转到此目录下);%USERNAME% 为当前的用户名(可通过cmd中输入echo %USERNAME% 查看).%TEMP%/hsperfdata_%USERNAME% 目录会存放该用户所有已经启动的java进程信息。
而jps、jconsole、jvisualvm等工具的数据来源就是这个文件(/%TEMP%/hsperfdata_%USERNAME%/pid)。所以当该文件不存在或是无法读取时就会出现jps无法查看该进程号.
解决
Local Applications Cannot Be Detected (Error Dialog On Startup)Description: An error dialog saying that local applications cannot be detected is shown immediately after VisualVM startup.
Resolution: This can happen on Windows systems, it's caused by misconfigured jvmstat technology used to detect the running applications. There are two possible causes:
Insufficient permissions for %TMP%\hsperfdata_username folder - make sure you're able to create a file in the directory and eventually update the permissions for full folder access. Alternatively you can just re-create the folder which should automatically set the correct access rights. See see this forums.sun.com thread for more details.
Having %TMP%\hsperfdata_username folder on a FAT disk - by default jvmstat doesn't work on FAT disks due to security restrictions. You can bypass the security check by setting the -XX:+PerfBypassFileSystemCheck flag for both VisualVM and the monitored application. See the JDK bug #5042659 for more details.(访问地址:点击打开链接)
--- https://visualvm.java.net/troubleshooting.html#jpswin
- java 的hsperfdata_%USERNAME%文件夹不能自动生成原因解决
- gen文件夹不能自动创建的原因
- android 应用开发不能自动生成R.java的原因
- res中添加的资源不能在R.java中自动生成的原因及解决方法
- android项目中gen目录不能自动生成的原因
- R文件不能自动生成的原因之一
- 【已解决】Android不能自动生成R.java
- 解决迅雷435自动生成vod_cache_data文件夹的补丁
- 解决hibernate5不能自动生成表的问题
- R.java中不能生成id的原因:
- android R.java文件不能生成的原因
- 在res文件夹下创建menu,但是R.java文件不能自动生成资源id
- android R.java资源文件不自动生成的原因
- R.java 文件不能生成原因探究
- mybatis 的逆向工程自动生成代码,如果不能使用,可能的原因
- android环境不能自动生成R.java文件的问题
- R.java不能自动生成资源ID的问题
- Android的ADT不能自动生成R.java
- C#线程同步讲解(二):
- HOSVD高阶奇异值分解
- 【数据结构&&算法系列】并查集简单介绍
- 游戏架构 云游戏(5)-游戏架构
- IOS概述
- java 的hsperfdata_%USERNAME%文件夹不能自动生成原因解决
- SDCard文件读写与目录浏览 笔记
- 学习笔记→JS时间类型ToString()
- java Bitmap 数据结构
- 基本查找算法 PHP 实现 保存 顺序查找,二分查找 分块查找
- qt中获得指定磁盘的空间大小
- young氏矩阵的操作及应用
- HTML5一个菜单居中的代码
- 关于自定义鼠标问题