打开终端

  1. /usr/libexec/java_home -V

image.png
位置:

/Library/Java/JavaVirtualMachines/jdk1.8.0_291.jdk/Contents/Home

进入目录:

  1. cd /Library/Java/JavaVirtualMachines/jdk1.8.0_291.jdk/Contents/Home/bin

启动jvisualvm

  1. jvisualvm