石头城程序猿
2021-08-12 00:04
采纳率: 50%
浏览 70
已结题

window下使用arthas分析JVM内存


D:\>java -jar arthas-boot.jar
[INFO] arthas-boot version: 3.5.3
[INFO] Found existing java process, please choose one and input the serial number of the process, eg : 1. Then hit ENTER.
  [1]: 20308
  [2]: 40756 org.jetbrains.idea.maven.server.RemoteMavenServer36
  [3]: 31384 org.jetbrains.jps.cmdline.Launcher
  [4]: 35244 com.jason.io.Math
4
[INFO] arthas home: C:\Users\jiahongfei\.arthas\lib\3.5.3\arthas
[INFO] Try to attach process 35244
[ERROR] Start arthas failed, exception stack trace:
com.sun.tools.attach.AttachNotSupportedException: 拒绝访问。
        at sun.tools.attach.WindowsVirtualMachine.<init>(WindowsVirtualMachine.java:64)
        at sun.tools.attach.WindowsAttachProvider.attachVirtualMachine(WindowsAttachProvider.java:69)
        at com.sun.tools.attach.spi.AttachProvider.attachVirtualMachine(AttachProvider.java:194)
        at com.sun.tools.attach.VirtualMachine.attach(VirtualMachine.java:250)
        at com.taobao.arthas.core.Arthas.attachAgent(Arthas.java:101)
        at com.taobao.arthas.core.Arthas.<init>(Arthas.java:26)
        at com.taobao.arthas.core.Arthas.main(Arthas.java:139)
[ERROR] attach fail, targetPid: 35244

找了一堆资料,没有找到对应的问题,求解

  • 收藏

1条回答 默认 最新

  • java叶新东老师 2021-08-12 16:04
    已采纳

    arthas是依赖jdk自带工具,像jps、jmap、jinfo等等,建议你重新安装一下jdk环境变量,jre和jdk都要配置一下

    已采纳该答案
    打赏 评论

相关推荐 更多相似问题