【问题标题】:Update the eclipse.ini to increase heap but no effect in eclipse?更新 eclipse.ini 以增加堆但在 eclipse 中没有效果?
【发布时间】:2015-01-30 00:19:50
【问题描述】:

我在 Ubuntu 14.04 上使用 Eclipse Kepler SR2,下面是我的 eclipse.ini


-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.200.v20140116-2212
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
3072m
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vmargs -Dorg.eclipse.swt.browser.XULRunnerPath=/DevTools/xulrunner -Dorg.eclipse.swt.browser.Defau$
-Dosgi.requiredJavaVersion=1.6
-XX:MaxPermSize=3072m
-Xms2048m
-Xmx3072m

但在 Eclipse 中,堆大小显示如下:

397 of 453M

如果我将鼠标悬停在它显示的堆大小信息上:

Heap size: 397M of total: 453M max: 455M mark: 397M

我预计最大值应该接近 3072M,因为这是在 eclipse.ini 中设置的

感谢任何见解。

【问题讨论】:

  • 你解决了吗?我有类似的问题。我的基于 Eclipse 的 IDE,无论我在 eclipse.ini 中增加多少,都不会反映堆大小的增加
  • 我最终卸载了 Eclipse Kepler 并安装了 Luna。
  • 你为什么分配-XX:MaxPermSize=3072m?您通常不需要它那么大。查看What is 'PermSize' in Java?
  • @AndiSetiyadi 你能解决这个问题吗,即能够通过安装 Luna 来根据需要设置堆大小?

标签: eclipse ubuntu-14.04


【解决方案1】:

eclipse.ini 中的每个条目必须位于单独的一行,您的行:

-vmargs -Dorg.eclipse.swt.browser.XULRunnerPath=/DevTools/xulrunner -Dorg.eclipse.swt.browser.Defau$

不会被识别为 VMargs 的开始。应该是:

-vmargs
-Dorg.eclipse.swt.browser.XULRunnerPath=/DevTools/xulrunner
... more args on separate lines ...

【讨论】:

  • 我试过你的建议,但没有效果。我最终卸载了 Kepler 并安装了 Luna。在 Luna 下,一切正常。
【解决方案2】:

我认为手动安装会导致这样的问题,因为我的 Eclipse 在通过 Ubuntu (14.04) 中的启动器运行时会完全忽略 eclipse.ini(使用 lock to launcher)。所以对我来说,解决方法是以任何其他方式运行它。桌面图标也可以。必须在该文件中设置属性 Path

【讨论】:

    猜你喜欢
    • 2016-03-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-01-25
    • 1970-01-01
    相关资源
    最近更新 更多