I have recently discovered the incredibly useful Eclipse Memory Analysis Tool, which makes quick work of finding memory leaks in Java applications. Unfortunately, after switching my JDK to 1.6 (under Mac OS 10.5), the JVM terminates immediately upon startup. All that appears is a dialog stating "JVM terminated" with "Exit code = -1".
Anyone else encounter this one? Perhaps there is a way to configure it to use a different JDK? (such as 1.5: which it was shown to be compatible with)
To configure Eclipse to use another VM use this command line:
eclipse -vm <path to java>
You can also specify the path in Eclipse.app/Contents/Info.plist. There is a section like this:
<!-- to use a specific Java version (instead of the platform's default) uncomment one of the following options:
<string>-vm</string><string>/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Commands/java</string>
<string>-vm</string><string>/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Commands/java</string>
-->
For the Memory Analyzer the you can find the Info.plist file under MemoryAnalyzer.app/Contents.