Tuesday, April 28, 2009

Eclipse MemoryAnalyzer Exit Code=-1

I was looking for a nice tool to read java heap dumps and found that regular JHat was not a great way to go with the 1.6GiB dump files I have. A friend pointed me to a Eclipse project Memory Analyzer (MAT) http://www.eclipse.org/mat/ which is the old SAP analyzer...

Starting it up I got the Exit Code=-1 error and found that this tool is currently not working with java 1.6.x on a mac. If you want to force the tool to use 1.5 open a terminal window and follow these instructions:

freddy@svn:~/mat/MemoryAnalyzer.app/Contents$ pwd
/Users/freddy/mat/MemoryAnalyzer.app/Contents
freddy@svn:~/mat/MemoryAnalyzer.app/Contents$ vi Info.plist

Uncomment this line:
... eworks/JavaVM.framework/Versions/1.5.0/Commands/java

This will force the use of Java 1.5!


No comments: