it is that time of year again: "eclipse.ini take 3" the settings strike back!
eclipse helios 3.6 and 3.6.x settings
- based on runtime options,
- and using the sun-oracle jvm 1.6u21 b7, released july, 27th (
some some sun proprietary options may be involved).
(by "optimized", i mean able to run a full-fledge eclipse on our crappy workstation at work, some old p4 from 2002 with 2go ram and xpsp3. but i have also tested those same settings on windows7)
warning: for non-windows platform, use the sun proprietary option
-xx:maxpermsize instead of the eclipse proprietary option
that is: unless you are using the latest jdk6u21 build 7. see the oracle section below.
p2.reconciler.dropins.directory to an external directory of your choice.
see this so answer. the idea is to be able to drop new plugins in a directory independently from any eclipse installation.
the following sections detail what are in this
the dreaded oracle jvm 1.6u21 (pre build 7) and eclipse crashes
andrew niefer did alert me to this situation, and wrote a blog post, about a non-standard vm argument (
-xx:maxpermsize) and can cause vms from other vendors to not start at all.
but the eclipse version of that option (
--launcher.xxmaxpermsize) is not working with the new jdk (6u21, unless you are using the 6u21 build 7, see below).
final solution is on the eclipse wiki, and for helios on windows with 6u21 pre build 7 only:
- downloading the fixed eclipse_1308.dll (july 16th, 2010)
- and place it into
that's it. no setting to tweak here (again, only for helios on windows with a 6u21 pre build 7).
for non-windows platform, you need to revert to the sun proprietary option
the issue is based one a regression: jvm identification fails due to oracle rebranding in java.exe, and triggered bug 319514 on eclipse.
andrew took care of bug 320005 - [launcher]
--launcher.xxmaxpermsize: issunvm should return true for oracle, but that will be only for helios 3.6.1.
francis upton, another eclipse committer, reflects on the all situation.
update u21b7, july, 27th:
oracle have regressed the change for the next java 6 release and won't implement it again until jdk 7.
if you use jdk6u21 build 7, you can revert to the
--launcher.xxmaxpermsize (eclipse option) instead of
-xx:maxpermsize (the non-standard option).
the auto-detection happening in the c launcher shim
eclipse.exe will still look for the "
sun microsystems" string, but with 6u21b7, it will now work - again.
for now, i still keep the
-xx:maxpermsize version (because i have no idea when everybody will launch eclipse the right jdk).
implicit `-startup` and `--launcher.library`
contrary to the previous settings, the exact path for those modules is not set anymore, which is convenient since it can vary between different eclipse 3.6.x releases:
- startup: if not specified, the executable will look in the plugins directory for the
org.eclipse.equinox.launcherbundle with the highest version.
- launcher.library: if not specified, the executable looks in the
pluginsdirectory for the appropriate
org.eclipse.equinox.launcher.[platform]fragment with the highest version and uses the shared library named
the jdk6 is now explicitly required to launch eclipse:
-dosgi.requiredjavaversion = 1.6
this so question reports a positive incidence for development on mac os.
the following options are part of some of the experimental options of the sun jvm.
they have been reported in this blog post to potentially speed up eclipse.
see all the jvm options here and also in the official java hotspot options page.
note: the detailed list of those options reports that
usefastaccessormethods might be active by default.
see also "update your jvm":
as a reminder, g1 is the new garbage collector in preparation for the jdk 7, but already used in the version 6 release from u17.
opening files in eclipse from the command line
see the blog post from andrew niefer reporting this new option:
this tells the launcher that if it is called with a command line that only contains arguments that don't start with "
-", then those arguments should be treated as if they followed "
this is the kind of command line the launcher will receive on windows when you double click a file that is associated with eclipse, or you select files and choose "
open with" or "
send to" eclipse.
relative paths will be resolved first against the current working directory, and second against the eclipse program directory.
p2 and the unsigned dialog prompt
if you are tired of this dialog box during the installation of your many plugins:
, add in your
i do want to say that security research supports the fact that less prompts are better.
people ignore things that pop up in the flow of something they want to get done.
for 3.6, we should not pop up warnings in the middle of the flow - no matter how much we simplify, people will just ignore them.
instead, we should collect all the problems, do not install those bundles with problems, and instead bring the user back to a point in the workflow where they can fixup - add trust, configure security policy more loosely, etc. this is called 'safe staging'.
those options are not directly in the
eclipse.ini above, but can come in handy if needed.
the `user.home` issue on windows7
when eclipse starts, it will read its keystore file (where passwords are kept), a file located in
if for some reason that
user.home doesn't resolve itself properly to a full-fledge path, eclipse won't start.
initially raised in this so question, if you experience this, you need to redefine the keystore file to an explicit path (no more user.home to resolve at the start)
add in your
wait, there's more than one setting file in eclipse.
if you add to your
eclipse.ini the option:
, you enable the debug mode and eclipse will look for another setting file: a
.options file where you can specify some osgi options.
and that is great when you are adding new plugins through the dropins folder.
add in your .options file the following settings, as described in this blog post "dropins diagnosis":
p2 will inform you what bundles were found in
dropins/folder, what request was generated, and what is the plan of installation. maybe it is not detailed explanation of what actually happened, and what went wrong, but it should give you strong information about where to start:
- was your bundle in the plan?
- was it installation problem (p2 fault)
- or maybe it is just not optimal to include your feature?
that comes from bug 264924 - [reconciler] no diagnosis of dropins problems, which finally solves the following issue like:
unzip eclipse-sdk-3.5m5-win32.zip to ..../eclipse
unzip mdt-ocl-sdk-1.3.0m5.zip to ..../eclipse/dropins/mdt-ocl-sdk-1.3.0m5
this is a problematic configuration since ocl depends on emf which is missing.
3.5m5 provides no diagnosis of this problem.
no obvious problems. nothing in error log.
help / about / plugindetails shows
org.eclipse.ocl.doc, but not
help / about / configurationdetails has no (diagnostic) mention of
help / installation / information installed softwarehas no mention of
where are the nice error markers?
see this blog post:
- in galileo (aka eclipse 3.5), jdt started resolving manifest classpath in libraries added to project’s build path. this worked whether the library was added to project’s build path directly or via a classpath container, such as the user library facility provided by jdt or one implemented by a third party.
- in helios, this behavior was changed to exclude classpath containers from manifest classpath resolution.
that means some of your projects might no longer compile in helios.
if you want to revert to galileo behavior, add:
this so question mentions a potential fix when not accessing to plugin update sites:
mentioned here just in case it could help in your configuration.
jvm1.7x64 potential optimizations
this article reports:
for the record, the very fastest options i have found so far for my bench test with the 1.7 x64 jvm n windows are:
but i am still working on it...
here's what i use (though i have them in the shortcut instead of the settings file):
eclipse.exe -showlocation -vm "c:\java\jdk1.6.0_07\bin\javaw.exe" -vmargs -xms256m -xmx768m -xx:+useparallelgc -xx:maxpermsize=128m
to specify which java version you are using, and use the dll instead of launching a javaw process
xx:+useparallelgc that's the most awesome option ever!!!
eclipse likes lots of ram. use at least -xmx512m. more if available.
if youre like me and had problems with the current oracle release of 1.6 then you might want to update your jdk or set
-xx:maxpermsize. more information is available here: http://java.dzone.com/articles/latest-java-update-fixes
my own settings (java 1.7, modify for 1.6):
c:/program files (x86)/java/jdk1.7.0/bin
here's my own setting for my eclipse running on i7 2630m 16gb ram laptop, this setting has been using for a week, without a single crashing, and eclipse 3.7 is running smoothly.
calculations: for win 7 x64
- xms = physical memory / 16
- xmx = physical memory / 4
- maxpermsize = same as default value, which is 256m
and these setting have worked like a charm for me. i am running os x10.6 , eclipse 3.7 indigo , jdk1.6.0_24
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.
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
if you are using linux + sun jdk/jre 32bits, change the "-vm" to:
if you are using linux + sun jdk/jre 64bits, change the "-vm" to:
that's working fine for me on ubuntu 8.10 and 9.04
if you're going with jdk6 update 14, i'd suggest using using the g1 garbage collector which seems to help performance.
to do so, remove these settings:
and replace them with these:
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:
- you do not need to restart eclipse for it to take affect.
- you can chose a short code.
- it appears first, before the perspective and application name.
eclipse indigo 3.7.2 settings (64 bit linux)
settings for sun/oracle java version "1.6.0_31" and eclipse 3.7 running on x86-64 linux:
note that this uses only 200 mb for the heap and 150 mb for the non-heap. if you're using huge plugins, you might want to increase both the "-xmx200m" and "-xx:maxpermsize=150m" limits.
the primary optimization target for these flags has been to minimize latency in all cases and as a secondary optimization target minimize the memory usage.
eclipse ganymede 3.4.2 settings
for more recent settings, see eclipse galileo 3.5 settings above.
the best jvm setting always, in my opinion, includes the latest jdk you can find (so for now, jdk1.6.0_b07 up to b16, except b14 and b15)
even with those pretty low memory settings, i can run large java projects (along with a web server) on my old (2002) desktop with 2go ram.
you can also consider launching:
as said in a previous question about memory consumption.
eclipse galileo 3.5 and 3.5.1 settings
currently (november 2009), i am testing with jdk6 update 17 the following configuration set of options (with galileo -- eclipse 3.5.x, see below for 3.4 or above for helios 3.6.x):
(of course, adapt the relative paths present in this eclipse.ini to the correct paths for your setup)
note: for eclipse3.5, replace
launcher.library lines by:
see also my original answer above for more information.
changes (from july 2009)
- refers to the launcher and not the framework
- shared plugins:
- galileo supports fully relative paths for workspace or vm (avoid having to modify those from one eclipse installation to another, if, of course, your jvm and workspace stay the same)
before, those relative paths kept being rewritten into absolute ones when eclipse launched itself...
- you also can copy the jre directory of a java jdk installation inside your eclipse directory
there was a bug with ignored breakpoints actually related to the jdk.
do use jdk6u16 or more recent for launching eclipse (you can then define as many jdks you want to compile within eclipse: it is not because you launch an eclipse with jdk6 that you will have to compile with that same jdk).
note the usage of:
as documented in the eclipse wiki,
eclipse 3.3 supports a new argument to the launcher:
if the vm being used is a sun vm and there is not already a
-xx:maxpermsize=vm argument, then the launcher will automatically add
-xx:maxpermsize=256mto the list of vm arguments being used.
the 3.3 launcher is only capable of identifying sun vms on windows.
as detailed in this entry:
not all vms accept the
-xx:maxpermsizeargument 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
-xxflag to the
eclipse.inias described above.
- 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
-vmargs -xx:maxpermsize=384mpart is the argument passed directly to the vm, bypassing the launcher entirely and no check on the vm vendor is used.
- What are the best JVM settings for Eclipse Luna (better performance)?
- What are the best JVM settings for Eclipse on windows 7 64 bit?
- What are the best JVM settings for Eclipse?
- What are the best plugins for eclipse available
- What is the best free plugin for Eclipse that allows for formatting/indenting/cleanup of JSP code?
- What is the single best free Eclipse plugin for authoring and editing XML documents?
- What are the best resources to get started with Eclipse plugin development?
- What are the advantages of using Emacs instead of Eclipse for Android development?
- What are the settings needs to be done in Eclipse IDE to run C/C++ Clang format plugin?
- What is the best Eclipse distribution for a mix of Java and Web?
- What are the corresponding ant javac options for Eclipse compiler settings?
- Where are the global settings for eclipse m2e?
- What are the best tips & tricks you use with Eclipse PDT
- What are the packages in /configuration/ used for in my Eclipse directory?
- When debugging with Eclipse what are the best ways to track down Null Pointer Exceptions?
- What are the minimum requirements to run an Eclipse Che server for 1 user?
- What are the Best Practices for Android Tools Locations?
- what is the best keymap for intellij, for an eclipse user
- What is the best practice for logging debug and trace messages in Eclipse plugin?
- What are the Find and Replace Symbols/Logic in Eclipse IDE for Java Developers 2020-09?
- Eclipse Plugin Development Default Key Bindings: What are the key codes for special keys (Shift, Alt, etc.)?
- how to know what are the lines covered in the code for a particular point of execution in eclipse
- What are the pros and cons of the SVN plugins for Eclipse, Subclipse and Subversive?
- Eclipse - "Incompatible JVM. Version 1.8.0_261 of the JVM is not suitable for this product. Version: 11 or greater is required"
- What is the difference between Eclipse for Java (EE) Developers and Eclipse Classic?
- What is the Eclipse shortcut for "public static void main(String args)"?
- Is Eclipse the best IDE for Java?
- What are the differences between plug-ins, features, and products in Eclipse RCP?
- What is the eclipse shortcut for auto-generating a default and field constructor?
- What are the gigantic *.CFS files all about in Eclipse workspace plugin folder?
More Query from same tag
- Eclipse Neon for Eclipse Committers can't resolve org.eclipse
- Unable to install egit plugin in eclipse galileo
- Uncompiled jar works but compiled doesn't work
- How to write a Maven build script to execute Java
- best way to export Eclipse project to GitHub
- Run the AlgoTrader in Eclipse
- Rendering an image, using C
- How to export into a jar that runs on external tools?
- Scala's Relative Package Imports
- Eclipse /bin/sh: g++: command not found
- error reading file skin.json libgdx
- How to add dependencies to an Eclipse e4 RCP application?
- Referencing values from an array in java
- Deleting row in sqlite database with multiple tables doesn't work
- How to install Flex Builder 3 plugin to eclipse Mars.2
- Eclipse indention for if statements without curly braces
- Invalid command do javaw in Eclipse?
- maven cannot run junit test for plug-in project
- Eclipse can't see objects in the array
- CheckboxTableViewer first column select all
- Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.17:test failed: There was an error in the forked process
- JBoss server exception while connecting to mysql
- Using Django to build a template on Pydev in Eclipse
- How to get .apk of Android application to distribute in eclipse?
- Running Tomcat from Eclipse: how to add a virtual host?
- Eclipse Unresolved compilation
- Eclipse is rejecting my public void init method
- eclipse equivalence of Tomcat proxyHost/proxyPort values
- Struts plugin for Eclipse
- Eclipse IDE Auto complete bug skipping line and moving cursor to middle of the next line