Difference between revisions of " eclipse.ini"

From Eclipsepedia

Jump to: navigation, search
m
Line 1: Line 1:
Eclipse startup is controlled by the options in <code>$ECLIPSE_HOME/eclipse.ini</code>. If <code>$ECLIPSE_HOME</code> is not defined, the default <code>eclipse.ini</code> in your Eclipse installation directory is used.
+
Eclipse startup is controlled by the options in <code>$ECLIPSE_HOME/eclipse.ini</code>. If <code>$ECLIPSE_HOME</code> is not defined, the default <code>eclipse.ini</code> in your Eclipse installation directory is used.  
  
<code>eclipse.ini</code> is a text file containing command-line options that are added to the command line used when Eclipse is started up. There are many options available, please see [http://help.eclipse.org/stable/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/misc/runtime-options.html here].
+
<code>eclipse.ini</code> is a text file containing command-line options that are added to the command line used when Eclipse is started up. There are many options available, please see [http://help.eclipse.org/stable/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/misc/runtime-options.html here].  
  
'''''Important:'''''
+
'''''Important:'''''  
# '''''Each option and each argument to an option must be on its own line.'''''
+
# '''''All lines after <code>-vmargs</code> are passed as arguments to the JVM, so all arguments and options for eclipse must be specified before <code>-vmargs</code> (just like when you use arguments on the command-line)'''''
+
  
By default, <code>eclipse.ini</code> contains something like
+
#'''''Each option and each argument to an option must be on its own line.'''''
 +
#'''''All lines after <code>-vmargs</code> are passed as arguments to the JVM, so all arguments and options for eclipse must be specified before <code>-vmargs</code> (just like when you use arguments on the command-line)'''''
 +
 
 +
By default, <code>eclipse.ini</code> contains something like  
  
 
  -showsplash
 
  -showsplash
Line 17: Line 18:
 
  -Xmx256m
 
  -Xmx256m
  
which sets the heap space to 40MB initially and a maximum of 256MB, and also specifies a maximum PermGen size of 256MB.
+
which sets the heap space to 40MB initially and a maximum of 256MB, and also specifies a maximum PermGen size of 256MB.  
  
 +
<br> One of the most recommended options to use is to [[FAQ How do I run Eclipse?#Find_the_JRE|specify a specific JVM]] for Eclipse to run on. Doing this ensures that you are ''absolutely certain'' which JVM Eclipse will run in and insulates you from system changes that can alter the "default" JVM for your system. Many a user has been tripped up because they thought they knew what JVM would be used by default, but they thought wrong. eclipse.ini lets you be '''CERTAIN'''.
  
One of the most recommended options to use is to [[FAQ_How_do_I_run_Eclipse%3F#Find_the_JRE| specify a specific JVM]] for Eclipse to run on. The following <code>eclipse.ini</code> demonstrates correct usage of the -vm option (for a Windows system):
+
The following <code>eclipse.ini</code> demonstrates correct usage of the -vm option (for a Windows system):  
  
 
  -showsplash
 
  -showsplash
Line 32: Line 34:
 
  -Xmx512m
 
  -Xmx512m
  
On a Linux system, the file looks quite similar:
+
'''''Note the format of the -vm option - it is important to be exact''''':
 +
 
 +
*The -vm option and its value (the path) must be on separate lines.
 +
*The value must be the full absolute path to the Java executable, not just to the Java home directory.
 +
 
 +
 
 +
 
 +
On a Linux system, the file looks quite similar:  
  
 
  -showsplash
 
  -showsplash
Line 44: Line 53:
 
  -Xmx512m
 
  -Xmx512m
  
 
+
<br> On a Mac OS X system, to specify Java 6:  
On a Mac OS X system, to specify Java 6:
+
  
 
  -showsplash
 
  -showsplash
Line 57: Line 65:
 
  -Xmx512m
 
  -Xmx512m
  
Note the format as it is important to be exact:
+
== See Also: ==
* The <code>-vm</code> option and its value (the path) must be on separate lines.
+
* The value must be the full absolute path to the Java executable, not just to the Java home directory.
+
 
+
  
== See Also: ==
+
*[[FAQ How do I run Eclipse?]]  
*[[FAQ How do I run Eclipse?]]
+
*[[FAQ How do I increase the heap size available to Eclipse?]]  
*[[FAQ How do I increase the heap size available to Eclipse?]]
+
 
*[[FAQ How do I increase the permgen size available to Eclipse?]]
 
*[[FAQ How do I increase the permgen size available to Eclipse?]]
  
 
{{Template:FAQ_Tagline}}
 
{{Template:FAQ_Tagline}}

Revision as of 09:35, 13 August 2009

Eclipse startup is controlled by the options in $ECLIPSE_HOME/eclipse.ini. If $ECLIPSE_HOME is not defined, the default eclipse.ini in your Eclipse installation directory is used.

eclipse.ini is a text file containing command-line options that are added to the command line used when Eclipse is started up. There are many options available, please see here.

Important:

  1. Each option and each argument to an option must be on its own line.
  2. All lines after -vmargs are passed as arguments to the JVM, so all arguments and options for eclipse must be specified before -vmargs (just like when you use arguments on the command-line)

By default, eclipse.ini contains something like

-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
-vmargs
-Xms40m
-Xmx256m

which sets the heap space to 40MB initially and a maximum of 256MB, and also specifies a maximum PermGen size of 256MB.


One of the most recommended options to use is to specify a specific JVM for Eclipse to run on. Doing this ensures that you are absolutely certain which JVM Eclipse will run in and insulates you from system changes that can alter the "default" JVM for your system. Many a user has been tripped up because they thought they knew what JVM would be used by default, but they thought wrong. eclipse.ini lets you be CERTAIN.

The following eclipse.ini demonstrates correct usage of the -vm option (for a Windows system):

-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
-vm
C:\Java\JDK\1.5\bin\javaw.exe
-vmargs
-Xms40m
-Xmx512m

Note the format of the -vm option - it is important to be exact:

  • The -vm option and its value (the path) must be on separate lines.
  • The value must be the full absolute path to the Java executable, not just to the Java home directory.


On a Linux system, the file looks quite similar:

-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
-vm
/opt/sun-jdk-1.6.0.02/bin/java
-vmargs
-Xms40m
-Xmx512m


On a Mac OS X system, to specify Java 6:

-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
-vm
/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/bin/java
-vmargs
-Xms40m
-Xmx512m

See Also:


This FAQ was originally published in Official Eclipse 3.0 FAQs. Copyright 2004, Pearson Education, Inc. All rights reserved. This text is made available here under the terms of the Eclipse Public License v1.0.