首页 文章

为什么当我更改最大堆大小时eclipse不会打开?

提问于
浏览
3

我在eclipse中安装了 MAT ,也打开了IBM格式堆转储的插件 .
当我尝试从eclipse打开带有 File->Open 的heapdump时,我收到一个消息框错误说:

在以下期间发生内部错误:“从'C:\ UserData \ heapdump.44124802.212242.6876.0003.phd'解析堆转储” . Java堆空间

我假设这是由于eclipse中的最大堆大小 . 目前eclipse.ini如下:

-startup plugins / org.eclipse.equinox.launcher_1.1.1.R36x_v20101122_1400.jar --launcher.library plugins / org.eclipse.equinox.launcher.win32.win32.x86_1.1.2.R36x_v20101222-product org.eclipse.epp . package.jee.product --launcher.defaultAction openFile --launcher.XXMaxPermSize 256M -showsplash org.eclipse.platform --launcher.XXMaxPermSize 256m --launcher.defaultAction openFile -vmargs -Dosgi.requiredJavaVersion = 1.5 -Xms40m -Xmx512m

如果我更改内存部分如下:

-Xms40m -Xmx1024m

然后eclipse甚至没有开始:

无法创建Java虚拟机

这里有什么问题?

2 回答

  • 0

    使用 java -version 在命令行上尝试 Xms Xmx 值 . 如果您指定的那些值在那里工作,我怀疑 PermGen 值需要以某种方式进行调整 . 如果没有,您可能没有系统上的可用内存 .

  • 0

    Java需要连续的内存用于堆空间 . 特别是Windows往往具有有限的连续可用内存区域(如果其他程序正在运行则会更小)

    此外,一般建议:设置 -Dosgi.requiredJavaVersion=1.6 ,而不是 1.5.

    看看这些链接..

    1. Java maximum memory
    2. Why is the maximum size of the Java heap fixed?

相关问题