10

When starting eclipse.exe it gives and error message

Failed to create Java Virtual Machine

When I click eclipsec.exe then eclipse starts. What is the difference between eclipse.exe and eclipsec.exe?

Why eclipse.exe is not working now which was working yesterday?

What will be impact if I use eclipsec.exe to start eclipse?

UdayKiran Pulipati
  • 6,579
  • 7
  • 67
  • 92
AmitG
  • 10,365
  • 5
  • 31
  • 52
  • 4
    http://stackoverflow.com/questions/7302604/eclipse-error-failed-to-create-the-java-virtual-machine duplicate – MayurB Mar 14 '13 at 09:04
  • Did you look at the logfile? – ppeterka Mar 14 '13 at 09:04
  • 1
    You might want to check if JAVA_HOME changed. Did you install a new JVM or JRE? – Simon Hellinger Mar 14 '13 at 09:11
  • I'm using XP and let Android SDK install in default directory. If I start Eclipse there (~\Program Files\Eclipse) everything works. If I try to use the directory I unzipped the Android SDK in I get the error you are talking about. Hope that helps some. –  Dec 30 '13 at 18:21

6 Answers6

27

Open eclipse.ini file and Change the vmargs sizes to

-vmargs
-Xms40m
-Xmx512m
-XX:MaxPermSize=256m

It works on my system.

UdayKiran Pulipati
  • 6,579
  • 7
  • 67
  • 92
10

1.Open folder with Eclipse.exe and find eclipse.ini file

2.Replace -vmargs by your current real path of javaw.exe:

-vm “c:\Program Files\Java\jdk1.7.0_07\bin\javaw.exe”

3.save .ini file and open eclipse. It will work.. happy coding.

iffu
  • 331
  • 1
  • 4
  • 16
  • 1
    this is literally the first answer on SE that actually explains what's happening. This fixed it for me. had nothing to do with memory allocation. Win10 and Eclipse NEON. – marts Aug 08 '16 at 22:12
9

When I click eclipsec.exe then eclipse starts. What is the difference between eclipse.exe and eclipsec.exe?

from eclipse wiki

You can start Eclipse by running eclipse.exe on Windows or eclipse on other platforms. This small launcher essentially finds and loads the JVM. On Windows, the eclipsec.exe console executable can be used for improved command line behavior.

meaning the eclipse.exe find the JVM for you and starts Eclipse IDE , Where as the eclipsec.exe is console exe where you can tweak how eclipse starts

What will be impact if I use eclipsec.exe to start eclipse. It give command prompt also.

No impact as such, eclipsec.exe is for windows only

ajduke
  • 4,991
  • 7
  • 36
  • 56
  • what do we mean by tweak to start eclipse? – AmitG Mar 14 '13 at 09:18
  • @AmitG you add the command line params to exe for starting eclipse iDE, such as you can specify the where to JRE using -vm param, or you can specify -Xmx /-Xms to specify the max/min heap – ajduke Mar 14 '13 at 09:29
8

In your eclipse.ini file

Add -vm C:\Program Files\Java\jre7\bin\javaw
below the line -Dosgi.requiredJavaVersion=1.6

And then remove 256m which is below the line --launcher.XXMaxPermSize. It will work.

sirhc
  • 6,097
  • 2
  • 26
  • 29
Jeet
  • 91
  • 1
  • 2
1

Write like below in .ini file and than it will work properly:

-vm C:\Java\jdk1.6.0_25\bin\javax.exe

Added above line in eclipse.ini file(on the top) and worked for me. C:\Java\jdk1.6.0_25\bin This path can be changed as per your system. Hope this will help someone.

Community
  • 1
  • 1
NoNaMe
  • 6,020
  • 30
  • 82
  • 110
1

Adding following line in .ini solved the same reported issue in my machine. -vm {path}\javaw.exe

Example: "-vm C:\Program Files\Java\jre7\bin\javaw.exe"

Peris
  • 29
  • 3