0

sorry for such a long question, But Please help with this problem.

I downloaded the adt bundle from the http://developer.android.com/sdk/index.html Followed the required steps to use it. i.e.

  1. unzip the folder
  2. set environment variables ...etc then start eclipse.

But as i start eclipce, it gives an error:

"Failed to create java virtual machine"

Searching google guided me, that i need to change the eclipse.ini file. but nothing helped.

here is the original eclipse.ini file:

-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
-Xms40m
-Xmx768m
-Declipse.buildId=v22.3.0-887826
-XX:MaxPermSize=512M

when i add the line

-vm
C:\Program Files\Java\jdk1.7.0_05\jre\bin\javaw.exe

or

-vm
C:\Program Files\Java\jdk1.7.0_05\bin\javaw.exe

error changes to

"java started but returned exit code=1"

on adding

-vm
C:\Program Files\Java\jdk1.7.0_05\jre\bin\server\jvm.dll

it again gives the older error:

"Failed to create java virtual machine"

Singh
  • 63
  • 1
  • 2
  • 10
  • similar questions exit on SO, but worked for me. Following are some of the SO links that i tried: 1. http://stackoverflow.com/questions/7302604/eclipse-error-failed-to-create-the-java-virtual-machine 2. http://stackoverflow.com/questions/14577663/eclipse-failed-to-create-the-java-virtual-machine 3. http://stackoverflow.com/questions/15404964/starting-eclipse-results-in-failed-to-create-java-virtual-machine – Singh Feb 12 '14 at 11:02

3 Answers3

0

There are two place in eclipse.ini that includes

--launcher.XXMaxPermSize
256m

make it

--launcher.XXMaxPermSize
128m

From here: Eclipse - Failed to create the java virtual machine

Community
  • 1
  • 1
Bhoot
  • 2,614
  • 1
  • 19
  • 36
0

I have already had this error, maybe not the same than you. But killing java process, restart eclipse worked for me.

for me vm line =

-vm

C:\Program Files\Java\jre7\bin\server

letroll
  • 1,059
  • 1
  • 14
  • 36
  • there are no java processes running on my system. Some eclipses processes were running. But killing them and restarting eclipse didn't work. – Singh Feb 12 '14 at 11:12
  • 1
    It failed to create java virtual machine so it's normal that you haven't got java processes running. – Marcello Davi Jun 18 '14 at 13:53
0

Will it make a difference if you use "", i.e

-vm
"C:\Program Files\Java\jdk1.7.0_05\jre\bin\server\jvm.dll"

Spaces in filepaths can usually be tricky, not sure how well Eclipse handles it.

Fredrik
  • 10,626
  • 6
  • 45
  • 81