mac os 下使用mat的坑

拿到mac安装了java10和java8,接着下载mat,结果点击直接报错,报错和这哥们一样
https://stackoverflow.com/questions/47909239/how-to-run-eclipse-memory-analyzer-on-mac-os
简单说就是系统默认的workspace路径是只读的,解决办法也提到了,更换默认位置就好了,只是需要注意添加参数时位置要在vm参数配置之前。
第二个坑是启动时提示:
Memory Analyzer WARNING: An illegal reflective access operation has occurred
经谷歌发现这是mat搭配java9的一个bug,解决问题很简单,在配置文件里面设置成java8就好了
第三个坑是启动后点击ui没反应!!!
继续谷歌,答案在这里,嗯就是更换了一个jar包
https://www.eclipse.org/forums/index.php/t/1090889/

配置文件在/你的下载位置/mat.app/Contents/Eclipse/MemoryAnalyzer.ini,最终的配置模样是

-startup
../Eclipse/plugins/org.eclipse.equinox.launcher_1.3.100.v20150511-1540.jar
-data
/Users/cdqiushengsen/Documents/mat/log
--launcher.library
../Eclipse/plugins/org.eclipse.equinox.launcher.cocoa.macosx.x86_64_1.1.300.v20150602-1417
-vm
/Library/Java/Home/jre
-vmargs
-Xmx1024m
-Dorg.eclipse.swt.internal.carbon.smallFonts
-XstartOnFirstThread

你可能感兴趣的:(mac os 下使用mat的坑)