macOS 打开 Eclipse Memory Analyzer 直接闪退解决方法
macOS MAT About 1,262 words现象
Memory Analyzer 1.13.0在macOS上打开直接闪退,无任何弹框提示。
原因
Memory Analyzer未读取到正确的JDK路径,或该JDK版本缺少运行组件。
配置 JDK 路径
进入到Memory Analyzer应用路径下
cd /Applications/mat.app/Contents
使用open .命令在Finder中打开文件夹
open .
编辑Info.plist文件,在<array>节点下添加-vm配置,指向JDK路径。
注意:注释中配置到的是Home/bin/java,是不正确的。只需配置到Home/bin即可。
<array>
<!-- To use a specific Java version (instead of the default) uncomment the following option and
edit it to add a VM. Installed VMs can be found via $/usr/libexec/java_home -V
<string>-vm</string><string>/Library/Java/JavaVirtualMachines/jdk-11.jdk/Contents/Home/bin/java</string>
-->
<string>-vm</string><string>~/jdk/graalvm-ce-java17-22.3.0/Contents/Home/bin</string>
<string>-keyring</string>
<string>~/.eclipse_keyring</string>
</array>
备注
Bellsoft的GraalVM版本的JDK会报如下错误,建议使用GraalVM-CE社区版本。
The JVM shared library "/Users/fendoudebb/jdk/bellsoft-liberica-vm-full-openjdk17-22.3.0/Contents/Home/bin/../lib/server/libjvm.dylib"
does not contain the JNI_CreateJavaVM symbol.
Memory Analyzer 下载路径
https://www.eclipse.org/mat/downloads.php
GraalVM 下载地址
Views: 4,248 · Posted: 2023-05-14
————        END        ————
Give me a Star, Thanks:)
https://github.com/fendoudebb/LiteNote扫描下方二维码关注公众号和小程序↓↓↓
Loading...