What are the best JVM settings for Eclipse? [close

2018-12-30 23:39发布

What are the best JVM settings you have found for running Eclipse?

标签: eclipse jvm
16条回答
听够珍惜
2楼-- · 2018-12-31 00:00

If you are using Linux + Sun JDK/JRE 32bits, change the "-vm" to:

-vm 
[your_jdk_folder]/jre/lib/i386/client/libjvm.so

If you are using Linux + Sun JDK/JRE 64bits, change the "-vm" to:

-vm
[your_jdk_folder]/jre/lib/amd64/server/libjvm.so

That's working fine for me on Ubuntu 8.10 and 9.04

查看更多
临风纵饮
3楼-- · 2018-12-31 00:05

-vm
C:\Program Files\Java\jdk1.6.0_07\jre\bin\client\jvm.dll

To specify which java version you are using, and use the dll instead of launching a javaw process

查看更多
谁念西风独自凉
4楼-- · 2018-12-31 00:07

You can also try running with JRockit. It's a JVM optimized for servers, but many long running client applications, like IDE's, run very well on JRockit. Eclipse is no exception. JRockit doesn't have a perm-space so you don't need to configure it.

It's possible set a pause time target(ms) to avoid long gc pauses stalling the UI.

-showsplash
org.eclipse.platform
-vm
 C:\jrmc-3.1.2-1.6.0\bin\javaw.exe 
-vmargs
-XgcPrio:deterministic
-XpauseTarget:20

I usually don't bother setting -Xmx and -Xms and let JRockit grow the heap as it sees necessary. If you launch your Eclipse application with JRockit you can also monitor, profile and find memory leaks in your application using the JRockit Mission Control tools suite. You download the plugins from this update site. Note, only works for Eclipse 3.3 and Eclipse 3.4

查看更多
不再属于我。
5楼-- · 2018-12-31 00:07

My own settings (Java 1.7, modify for 1.6):

-vm
C:/Program Files (x86)/Java/jdk1.7.0/bin
-startup
plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.100.v20100628
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-server
-Dosgi.requiredJavaVersion=1.7
-Xmn100m
-Xss1m
-XgcPrio:deterministic
-XpauseTarget:20
-XX:PermSize=400M
-XX:MaxPermSize=500M
-XX:CompileThreshold=10
-XX:MaxGCPauseMillis=10
-XX:MaxHeapFreeRatio=70
-XX:+UnlockExperimentalVMOptions
-XX:+DoEscapeAnalysis
-XX:+UseG1GC
-XX:+UseFastAccessorMethods
-XX:+AggressiveOpts
-Xms512m
-Xmx512m
查看更多
后来的你喜欢了谁
6楼-- · 2018-12-31 00:09

-showlocation

To make it easier to have eclipse running twice, and know which workspace you're dealing with

Eclipse 3.6 adds a preferences option to specify what to show for the Workspace name (shown in window title) which works much better than -showlocation for three reasons:

  1. You do not need to restart eclipse for it to take affect.
  2. You can chose a short code.
  3. It appears first, before the perspective and application name.
查看更多
千与千寻千般痛.
7楼-- · 2018-12-31 00:12
-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

And these setting have worked like a charm for me. I am running OS X10.6 , Eclipse 3.7 Indigo , JDK1.6.0_24

查看更多
登录 后发表回答