Difference between revisions of "FAQ How do I increase the heap size available to Eclipse?"

From Eclipsepedia

Jump to: navigation, search
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
Some JVMs put restrictions on the total amount of memory available
+
Some JVMs put restrictions on the total amount of memory available on the heap. If you are getting '''OutOfMemoryError'''s while running Eclipse, the VM can be told to let the heap grow to a larger amount by passing the <tt>-vmargs</tt> command to the Eclipse launcher. For example, the following command would  run Eclipse with a heap size of 256MB:
on the heap. If you are getting '''OutOfMemoryError'''s while running Eclipse,
+
the VM can be told to let the heap grow to a larger amount by passing
+
the <tt>-vmargs</tt> command to the Eclipse launcher. For example,
+
the following command would  run Eclipse with a heap size of 256MB:
+
 
<pre>
 
<pre>
    '''eclipse''' [normal arguments] '''-vmargs -Xmx256M''' [more VM args]
+
eclipse [normal arguments] -vmargs -Xmx256M [more VM args]
 
</pre>
 
</pre>
The arguments after <tt>-vmargs</tt> are directly passed
 
to the VM. Run <tt>java -X</tt> for the list of options your VM accepts.
 
Options starting with <tt>-X</tt> are implementation-specific
 
and may not be applicable to all VMs.
 
  
 +
The arguments after <tt>-vmargs</tt> are directly passed  to the VM. Run <tt>java -X</tt> for the list of options your VM accepts.  Options starting with <tt>-X</tt> are implementation-specific and may not be applicable to all VMs.
  
 +
You can also put the extra options in <code>[[eclipse.ini]]</code>. 
  
 +
Here is an example;
  
 +
<pre>
 +
-startup
 +
plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
 +
--launcher.library
 +
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.200.v20120913-144807
 +
-showsplash
 +
org.eclipse.platform
 +
--launcher.XXMaxPermSize
 +
256m
 +
--launcher.defaultAction
 +
openFile
 +
-vmargs
 +
-Xms512m
 +
-Xmx1024m
 +
-XX:+UseParallelGC
 +
-XX:PermSize=256M
 +
-XX:MaxPermSize=512M
 +
</pre>
  
 
== See Also: ==
 
== See Also: ==
 +
*[[FAQ How do I run Eclipse?]]
  
 
+
{{Template:FAQ_Tagline}}
[[FAQ_How_do_I_run_Eclipse%3F]]
+
 
+
<hr><font size=-2>This FAQ was originally published in [http://www.eclipsefaq.org Official Eclipse 3.0 FAQs]. Copyright 2004, Pearson Education, Inc. All rights reserved. This text is made available here under the terms of the [http://www.eclipse.org/legal/epl-v10.html Eclipse Public License v1.0].</font>
+

Latest revision as of 16:47, 10 April 2013

Some JVMs put restrictions on the total amount of memory available on the heap. If you are getting OutOfMemoryErrors while running Eclipse, the VM can be told to let the heap grow to a larger amount by passing the -vmargs command to the Eclipse launcher. For example, the following command would run Eclipse with a heap size of 256MB:

eclipse [normal arguments] -vmargs -Xmx256M [more VM args]

The arguments after -vmargs are directly passed to the VM. Run java -X for the list of options your VM accepts. Options starting with -X are implementation-specific and may not be applicable to all VMs.

You can also put the extra options in eclipse.ini.

Here is an example;

-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.200.v20120913-144807
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-Xms512m
-Xmx1024m
-XX:+UseParallelGC
-XX:PermSize=256M
-XX:MaxPermSize=512M

[edit] 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.