3

I'm using eclipse to develop android application and it always gone well, but today it's giving problems.

When i try to open eclipse it show me this message "Failed to create the java virtual machine. Error occurred during initialization of VM. Could not reserve enough space for object heap"

This is my 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
-Dosgi.requiredJavaVersion=1.8
-Xms1336m 
-Xmx1336m
-Declipse.buildId=v22.3.0-887826
-XX:MaxPermSize=512M

I tried to change "256m" in "512m" but it still doesn't work. I tried to restart but nothing. I tried to change the -XX:MaxPermSize=512M value, but nothing.

Uttam Panchasara
  • 5,735
  • 5
  • 25
  • 41
Samjack
  • 190
  • 1
  • 1
  • 11
  • Yeah, you're going the wrong way with your logic. [See this](http://stackoverflow.com/questions/6642184/could-not-reserve-enough-space-for-object-heap-to-start-jvm), or any of the many same questions here. – ChiefTwoPencils Dec 01 '13 at 21:50
  • check this http://stackoverflow.com/questions/7302604/eclipse-error-failed-to-create-the-java-virtual-machine/21189240#21189240 – A Garhy Jan 17 '14 at 15:16

3 Answers3

2

Just add your JDK path in windows environment variable.

enter image description here

Sazzad Hissain Khan
  • 37,929
  • 33
  • 189
  • 256
2

Open eclipse.ini and change the following variables.

For -Dosgi.requiredJavaVersion=1.8, try changing your required Java version to 1.6.

Memory-related defaults (as of Eclipse 3.4):

  • -Xms40m
  • -Xmx256m
  • -XX:MaxPermSize=256m

Recommended settings for Android development:

  • -Xms128m
  • -Xmx512m
  • -XX:MaxPermSize=256m

If everything else fails you can just delete or rename eclipse.ini and let the IDE handle everything. I strongly suggest looking for a current replacement for your eclipse.ini and reading up on how to configure the eclipse.ini for Android development.

Secko
  • 7,664
  • 5
  • 31
  • 37
1

Closed all the other memory intensive application in my windows7. And tried to open eclipse. This worked for me, and I found it on similar question here Stackoverflow-eclipse failed to create JVM.

Community
  • 1
  • 1
Neeraj Nama
  • 1,562
  • 1
  • 18
  • 24