mac mat 启动异常 Failed to create the Java Virtual Machine 解决

Scroll Down

Mac系统启动 MemoryAnalyzer(mat) 报错

Failed to create the Java Virtual Machine
  • 原因
    导致此问题的原因是mat暂不支持高版本jdk,需要指定低版本jdk。

  • 解决方式-配置指定jdk版本,修改如下配置

/Applications/mat.app/Contents/Eclipse/MemoryAnalyzer.ini

增加如下

-vm
/Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk/Contents/Home/bin
  • 增加后配置如下
-startup
../Eclipse/plugins/org.eclipse.equinox.launcher_1.5.0.v20180512-1130.jar
--launcher.library
../Eclipse/plugins/org.eclipse.equinox.launcher.cocoa.macosx.x86_64_1.1.700.v20180518-1200
-vm
/Library/Java/JavaVirtualMachines/jdk1.8.0_231.jdk/Contents/Home/bin
-vmargs
-Xmx1024m
-Dorg.eclipse.swt.internal.carbon.smallFonts
-XstartOnFirstThread

EOF