您为运行Eclipse找到的最佳JVM设置是什么?
当前回答
Eclipse喜欢大量的RAM。至少使用-Xmx512M。更多,如果有。
其他回答
-startup
../../../plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
--launcher.library
../../../plugins/org.eclipse.equinox.launcher.cocoa.macosx_1.1.100.v20110502
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-Xms128m
-Xmx512m
-XX:MaxPermSize=256m
-Xdock:icon=../Resources/Eclipse.icns
-XstartOnFirstThread
-Dorg.eclipse.swt.internal.carbon.smallFonts
-Dcom.sun.management.jmxremote
-Declipse.p2.unsignedPolicy=allow
这些设置对我来说就像一个魅力。我正在运行OS X10.6, Eclipse 3.7 Indigo, JDK1.6.0_24
如果你和我一样,对当前的Oracle 1.6版本有问题,那么你可能想要更新JDK或设置-XX:MaxPermSize。更多信息请访问:http://java.dzone.com/articles/latest-java-update-fixes
Eclipse Galileo 3.5和3.5.1设置
目前(2009年11月),我正在用jdk6更新17测试以下配置选项集(使用Galileo—eclipse 3.5)。3.4或以上版本的helios3.6.x,请参见下文): (当然,将eclipse.ini中的相对路径调整为正确的设置路径)
注意:对于eclipse3.5,替换startup和launcher。图书馆行:
-startup
plugins/org.eclipse.equinox.launcher_1.0.200.v20090520.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519
eclipse.ini 3.5.1
-data
../../workspace
-showlocation
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
384m
-startup
plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519
-vm
../../../../program files/Java/jdk1.6.0_17/jre/bin/client/jvm.dll
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms128m
-Xmx384m
-Xss4m
-XX:PermSize=128m
-XX:MaxPermSize=384m
-XX:CompileThreshold=5
-XX:MaxGCPauseMillis=10
-XX:MaxHeapFreeRatio=70
-XX:+UseConcMarkSweepGC
-XX:+CMSIncrementalMode
-XX:+CMSIncrementalPacing
-Dcom.sun.management.jmxremote
-Dorg.eclipse.equinox.p2.reconciler.dropins.directory=C:/jv/eclipse/mydropins
更多信息请参见上面我的原始答案。
变更(2009年7月起)
指的是启动器而不是框架 共享插件:org.eclipse.equinox.p2.reconciler.dropins。目录选项。 Galileo完全支持工作空间或VM的相对路径(当然,如果您的JVM和工作空间保持不变,则可以避免从一个eclipse安装到另一个eclipse安装时修改它们) 在此之前,当eclipse启动时,这些相对路径一直被重写为绝对路径…… 您还可以将Java JDK安装的JRE目录复制到eclipse目录中
警告
有一个被忽略的错误,实际上与JDK有关。 一定要使用JDK6u16或更新的版本来启动eclipse(然后可以在eclipse中定义任意数量的JDK来编译:并不是因为使用JDK6启动eclipse就必须使用相同的JDK来编译)。
Max
注意用法:
--launcher.XXMaxPermSize
384m
-vmargs
-XX:MaxPermSize=128m
正如Eclipse Wiki中所记录的那样,
Eclipse 3.3支持启动器的一个新参数:——launcher. xxmaxpermsize。 如果正在使用的VM是Sun VM,并且还没有-XX:MaxPermSize= VM参数,那么启动器将自动将-XX:MaxPermSize=256m添加到正在使用的VM参数列表中。 3.3启动器只能识别Windows上的Sun虚拟机。
如本条目所述:
Not all vms accept the -XX:MaxPermSize argument which is why it is passed in this manner. There may (or may not) exist problems with identifying sun vms. Note: Eclipse 3.3.1 has a bug where the launcher cannot detect a Sun VM, and therefore does not use the correct PermGen size. It seems this may have been a known bug on Mac OS X for 3.3.0 as well. If you are using either of these platform combination, add the -XX flag to the eclipse.ini as described above. Notes: the "384m" line translates to the "=384m" part of the VM argument, if the VM is case sensitive on the "m", then the so is this argument. the "--launcher." prefix, this specifies that the argument is consumed by the launcher itself and was added to launcher specific arguments to avoid name collisions with application arguments. (Other examples are --launcher.library, --launcher.suppressErrors) The -vmargs -XX:MaxPermSize=384m part is the argument passed directly to the VM, bypassing the launcher entirely and no check on the VM vendor is used.
如果您要使用jdk6更新14,我建议使用G1垃圾收集器,这似乎有助于提高性能。
要做到这一点,删除这些设置:
- xx: + UseConcMarkSweepGC - xx: + CMSIncrementalMode - xx: + CMSIncrementalPacing
然后用这些替换它们:
-XX:+解锁实验性VMOptions -XX:+使用G1GC
-showlocation
为了让eclipse更容易运行两次,并知道您正在处理哪个工作区
Eclipse 3.6添加了一个首选项选项来指定要显示的工作区名称(显示在窗口标题中),这比-showlocation好用得多,原因有三:
不需要重新启动eclipse即可使其生效。 你可以选择一个短代码。 它出现在透视图和应用程序名称之前。
推荐文章
- 如何在Eclipse中只使用键盘去一个错误?
- 如何在Eclipse中生成Javadoc注释?
- 如何在EPF Composer 1.5中删除一个规程?
- Eclipse调试器总是阻塞在ThreadPoolExecutor上,没有任何明显的异常,为什么?
- 是什么原因导致Eclipse中导入的Maven项目默认使用Java 1.5而不是Java 1.6,我如何确保它不使用?
- 如何从Eclipse设置java.library.path
- 如何使Eclipse/EGit在更新后识别现有的存储库信息?
- 为什么每当我创建一个新项目时,Eclipse都会自动添加appcompat v7库支持?
- 如何在Eclipse CDT中启用c++ 11/ c++ 0x支持?
- Eclipse错误:“创建Java虚拟机失败”
- 是否有Eclipse行宽标记?
- Eclipse -“正在使用或无法创建的工作区,请选择另一个。”
- 在Eclipse中更改字符串的大小写
- 在Eclipse中粘贴多行Java字符串
- 如何从Eclipse中的开放资源对话框中隐藏.class文件?