1

Java Heap Space error occurring in my system. I tried lot of solutions from Stack Overflow but nothing is working. When i am working

enter image description here

when pressing OK then enter image description here

enter image description here

(No error in my project)

My eclipse.ini Is:

-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.200.v20120913-144807
-product
com.android.ide.eclipse.adt.package.product
--launcher.XXMaxPermSize
256M
-showsplash
com.android.ide.eclipse.adt.package.product
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.6
-Declipse.buildId=v22.3.0-887826
-XX:MaxPermSize=512M

My RAM:4GB Please help me to solve this issue.

3 Answers 3

2

It's because Eclipse runs out of memory. What you can do is increase the allocated memory by editing (or creating) the eclipse.ini file (on a root of eclipse directory) and putting the following code:

-vmargs
-Xms512m (for 512 Mb)
-Xmx1024m (for 1024 Mb)

For a full list of available options, please check this link.

Sign up to request clarification or add additional context in comments.

2 Comments

please tell me where to add those values
Ad a I said, into the eclipse.ini file on the root of your eclipse installation.
2

Change in eclipse.ini

 -startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.200.v20120913-144807
-product
com.android.ide.eclipse.adt.package.product
--launcher.XXMaxPermSize
256M
-showsplash
com.android.ide.eclipse.adt.package.product
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-Xms512m
-Xmx512m
-Dosgi.requiredJavaVersion=1.6
-Declipse.buildId=v22.3.0-887826
-XX:MaxPermSize=512M

Comments

0

you increase jvm memory in control panel. Its ok you have 4GB of memory but how much you have allocated for jvm to run is important let me know any further clarification.

4 Comments

pls tell me how to know that how much memory has been allocated for jvm.
if you using windows go to control Panel - > java -> java tab --> View --> edit java run time parameters .. with some -jmx 1000 which say use 1000 mb for jvm .. but I suggest you check the syntex properly I dont remember it so.
That field is blank in my machine
I also suggest you go to your eclipse installation and edit eclipse.ini file with memory parameter. -Xms40m(minimum) -Xmx1024m (maximum)

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.