在具有J2SE 6.0的Mac OS上启动Eclipse MAT时,JVM终止 [英] JVM terminates when launching Eclipse MAT on Mac OS with J2SE 6.0

查看:99
本文介绍了在具有J2SE 6.0的Mac OS上启动Eclipse MAT时,JVM终止的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近发现了非常有用的 Eclipse内存分析工具,该工具可以快速查找Java应用程序中的内存泄漏.不幸的是,在将我的JDK切换到1.6(在Mac OS 10.5下)之后,JVM在启动时立即终止.出现的只是一个对话框,指出"JVM已终止"并带有退出代码= -1".

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".

还有其他人遇到吗?也许有一种方法可以配置它以使用其他JDK? (例如1.5:表明与之兼容)

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)

推荐答案

要将Eclipse配置为使用其他VM,请使用以下命令行:

To configure Eclipse to use another VM use this command line:

eclipse -vm <path to java>

您还可以在Eclipse.app/Contents/Info.plist中指定路径.有这样的部分:

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>
-->

对于Memory Analyzer,您可以在MemoryAnalyzer.app/Contents下找到Info.plist文件.

For the Memory Analyzer the you can find the Info.plist file under MemoryAnalyzer.app/Contents.

这篇关于在具有J2SE 6.0的Mac OS上启动Eclipse MAT时,JVM终止的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆