Reputation: 113
I downloaded a stand-alone Eclipse Memory Analyzer from the official site, intending to use it to open a hprof file to do some analysis work. However, the application seems to get stuck after starting up. I can do nothing but drag the window, as the figure shows below:
The OS I’m using is macOS Sierra, the mat version is 1.6.1, and here is the MemoryAnalyzer.ini:
-startup
../Eclipse/plugins/. org.eclipse.equinox.launcher_1.3.100.v20150511-1540.jar
-data
/Users/XXX/eclipse_data
--launcher.library
../Eclipse/plugins/org.eclipse.equinox.launcher.cocoa.macosx.x86_64_1.1.300.v20150602-1417
-vm
/Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home/bin/java
-vmargs
-Xmx2g
-Dorg.eclipse.swt.internal.carbon.smallFonts
-XstartOnFirstThread
Can anyone give me some advice? Thanks a lot.
Upvotes: 6
Views: 2696
Reputation: 11
I was facing the same problem while opening MAT on my machine. Os Version: MAC Os Siera 10.12.6(16G1212) Java/JDK : jdk-9.0.1.jdk
Somehow it was not reading default Java_home location. I have added Java_home location to the info.plist and it worked.
<string>-vm</string><string>/Library/Java/JavaVirtualMachines/jdk-9.0.1.jdk/Contents/Home</string>
<array>
<string>-vm</string><string>/Library/Java/JavaVirtualMachines/jdk-9.0.1.jdk/Contents/Home</string>
<!-- to use a specific Java version (instead of the platform's default) uncomment one of the following options,
or add a VM found via $/usr/libexec/java_home -V
<string>-vm</string><string>/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Commands/java</string>
<string>-vm</string><string>/Library/Java/JavaVirtualMachines/1.8.0.jdk/Contents/Home/bin/java</string>
-->
<string>-keyring</string>
<string>~/.eclipse_keyring</string>
<string>-showlocation</string>
</array>
Upvotes: 1
Reputation: 2714
Same issue here with High Sierra.
I installed a vanilla Eclipse from https://www.eclipse.org/downloads/
And then installed MAT through the update-site at: http://download.eclipse.org/mat/1.7/update-site/
Once you restart eclipse you can select Window / Perspective / Open Perspective / Other / Memory Analysis
and you will have a working installation.
Upvotes: 1
Reputation: 3203
I had the same issue using jdk1.8.0_161.jdk
Then using an older JVM :
-vm
/Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/bin
now it's working again.
My complete MemoryAnalyzer.ini:
-startup
../Eclipse/plugins/org.eclipse.equinox.launcher_1.3.100.v20150511-1540.jar
--launcher.library
../Eclipse/plugins/org.eclipse.equinox.launcher.cocoa.macosx.x86_64_1.1.300.v20150602-1417
-vm
/Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/bin
-data
/Users/German/tmp/workspace_mat
-vmargs
-Xmx5g
-Dorg.eclipse.swt.internal.carbon.smallFonts
-XstartOnFirstThread
PD: I haven't tested it with an older jdk8 version. I remember, it used to work with older than version 161.
Upvotes: 1