score:82

Accepted answer

try removing the -vm p:\programs\jdk1.6\bin lines.


also, a general recommendation: set -dosgi.requiredjavaversion=1.6, not 1.5.

score:0

i was facing the same problem, and i found the solution. there are issues in allocation of maxpermsize. if you try to allocate more than your machine's free space then it gives this error in my issue. so try to reduce maxpermsize.

i think it will help you to sort out your issue.

score:0

all these solutions failed me. this happened to me out of the blue after using eclipse for six months. it seems somehow my jdk got corrupted.

my eventual solution was to download a newer jdk and update my java_home accordingly, from jdk1.6.0_37 to jdk1.6.0_43 in my case.

score:0

@maro for me it worked very simply!

after getting the error message alert, i executed 'eclipsec.exe' from a command prompt. this opened eclipse. then again i tried with 'eclipse.exe' and now it's working nice and well.

unfortunately, it didn't give any technical reason for this.

score:0

for me it solved by changing the jdk bin path in the path environment variable. put the jdk bin path which has jre/bin/client/jvm.dll under jdk home.

score:0

in my case this problem occured after updating java from 1.6 to 1.7.

to understand the error, run java.exe in the folder of eclipse.exe. use parameters from eclipse.ini as it will show which parameter causes the failure.

for example:

f:\mobile class\adt-bundle-windows-x86\adt-bundle-windows-x86\eclipse>java -star
tup plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar --launcher.lib
rary plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.200.v20120522-1813
 -product com.android.ide.eclipse.adt.package.product --launcher.xxmaxpermsize 7
68m  -showsplash org.eclipse.platform --launcher.xxmaxpermsize 768m --launcher.d
efaultaction openfile -vm c:\program files\java\jre7\bin\client\jvm.dll -vmargs
-dosgi.requiredjavaversion=1.6 -declipse.buildid=v21.1.0-569685 -xms40m -xmx768m

unrecognized option: -startup
error: could not create the java virtual machine.
error: a fatal exception has occurred. program will exit.

so i changed 'startup' swith to 'jar' like below and problem fixed:

f:\mobile class\adt-bundle-windows-x86\adt-bundle-windows-x86\eclipse>java -jar
plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar --launcher.library
 plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.200.v20120522-1813 -pr
oduct com.android.ide.eclipse.adt.package.product --launcher.xxmaxpermsize 768m
-showsplash org.eclipse.platform --launcher.xxmaxpermsize 768m --launcher.defaul
taction openfile -vm c:\program files\java\jre7\bin\client\jvm.dll -vmargs -dosg
i.requiredjavaversion=1.6 -declipse.buildid=v21.1.0-569685 -xms40m -xmx768m

score:0

steps to solve the issue :-

  1. open the eclipse.ini file from your eclipse folder.

  2. it has some of add on configuration . find the line –launcher.xxmaxpermsize.it will be the last line in this file. now remove/delete the the default value 256m and save it.

score:0

-vm d:\java\jdk1.6.0_29\bin\javaw.exe

score:0

go to task manager, end all unnecessary tasks, and start eclipse. you will not get this error. try it; it worked for me :)

score:0

one eclipse window was already opened on my machine and when i tried to open another eclipse instance, i got this error. i just closed my open eclipse windows and then launched another. and there was no such error anymore :)

score:0

after failing with the above proven steps, i tried something after deciding to re-install.

added : %\user path\java\jdk1.6.0_39\bin to environment variables

deleted: eclipse configuration file

re-run : eclipsec.exe

now everything from projects is back working.

score:0

all i had to do was to remove -vm from the eclipse.ini file and return. this time it will tell you where it is looking for javaw.exe so you can go there and delete the symbolic link. make sure you have java_home defined to your jdk path.

score:0

i remove -xx:+usestringdeduplication from eclipse.ini . if you run eclipsec.exe you get better descryiption .

score:0

i tried all the above things, nothing worked for me. follow the steps to check further:

  1. check the java version in cmd: java -
  2. add -vm javapath
  3. if you have installed any java version latest/previous versions,go to the java folder,check if it has any jre folder along with jdk.(ex-jdk 1.7 along with jre1.7)
  4. go to control panel, uninstall that particular java runtime envionment(jre).
  5. now you should be able to run eclipse.

score:0

the problem appeared first right after patching dcevm with version: dcevm-8u181-installer.jar.

then, temoving the flag -xx:+useg1gc from eclipse.ini it fixed the issue.

score:0

i was also facing this issue. you might have more than java versions installed. make sure that java_home variable is set to the correct version.

score:0

for macosx and homebrew users:

given you installed eclipse via homebrew: brew install --cask eclipse-java.rb then it might not find your java sdk, so open up your eclipse.ini file in ~/.homebrew/caskroom/eclipse-java

and add the following line to eclipse.ini above vmargs:

-vm /library/java/javavirtualmachines/amazon-corretto-8.jdk/contents/home/bin

score:0

go to configuration panel and follow enter image description here

change your variable java_home to the jdk you use. in my case i change for last version of java for new proyects and the eclipse for older proyects cant run because of this.

score:1

adding this fixed the issue for me:

-vm

d:\java\jdk1.6.0_29\bin\javaw.exe

score:1

reduce param size upto -256

see my eclipse.ini file

    -startup
   plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
   --launcher.library
  plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.100.v20110502
  -product
   org.eclipse.epp.package.jee.product
   --launcher.defaultaction
   openfile
   --launcher.xxmaxpermsize
   256m
  -showsplash
   org.eclipse.platform
   --launcher.xxmaxpermsize
   256m
  --launcher.defaultaction
  openfile
  -vmargs
  -dosgi.requiredjavaversion=1.6
  -xms40m
  -xmx512m

score:1

enter image description herei had that following issue. so i did was find that eclipse.ini file in the eclipse installation folder. then i edited that as follows

then i edited as follows add java jdk file desitination for -vm.remove xx things and add xx:maxpermseze=256

score:2

this worked for me:

i closed all the other memory intensive applications on my windows 7 machine. and i tried to open eclipse, and, voila, it worked.

score:2

some time it's not your eclipse.ini; it's your jdk which is crashed. you can check it by writing following command in a command prompt:

c:\> java -version

if this command shows the following error:

error occurred during initialization of vm

java/lang/noclassdeffounderror: java/lang/object

then first uninstall jdk and reinstall it.

eclipse will be in action again ;) as today i have got the same problem, and the above is suggested by itachi uchiha.

score:2

faced the issue when my eclipse proton could not start. got error "failed to create the java virtual machine"

added below to the eclipse.ini file

-vm
c:\program files\java\jdk-10.0.1\bin\javaw.exe

score:2

you need to add javaw.exe full path with forward slash i.e. / instead \ to eclipse.ini even you are on windows. like below:

-vm
c:/program files/java/jdk-14/bin/javaw.exe

also the above lines must be placed before -vmargs.

score:3

try this one:

-startup plugins/org.eclipse.equinox.launcher_1.1.1.r36x_v20101122_1400.jar 
--launcher.library plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.2.r36x_v20101222 
-showsplash org.eclipse.platform 
--launcher.xxmaxpermsize 256m 
--launcher.defaultaction openfile 
-vm f:\program files\jdk1.6\bin\javaw.exe 
-vmargs 
-xms512m 
-xmx512m 
-xx:+useparallelgc 
-xx:permsize=256m 
-xx:maxpermsize=512m

score:3

this may work:

open eclipse.ini file and paste below lines at the end of the lines.

-vmargs
-xms40m
-xmx512m
-xx:maxpermsize=256m

score:3

quick fix:

change -xmx1024m to -xmx512m in eclipse.ini (file located at the same level where eclipse.exe is present). and it will work like a charm.

score:3

the simple way to fix this problem is just to delete or rename your eclipse.ini file. try it first. if this method does not resolve your problem, try the solutions described below.

other ways to fix it:

solution 1

add a string into the eclipse.ini file which change a destination of the javaw.exe file. the main thing is that this string must be placed above the string "-vmargs"!

-vm
c:\program files\java\jdk1.6.0_22\bin\javaw.exe 

solution 2

remove the value of –launcher.xxmaxpermsize, like 256m.

solution 3

remove or decrease the values of xms and xmx:

-xms384m 
-xmx384m

score:3

after adding -vm in eclipse.ini as shown below worked for me. add it before -vmargs do not remove it

-vm
c:\apps\java\jdk1.8.0_92\bin\javaw.exe
-vmargs

there was a jdk update which was causing this issue.

score:3

the proper solution to your problem is to add the -vm line pointing to jvm.dll file of your java folder in ini fie.

-vm
c:\program files\java\jre1.8.0_202\bin\server\jvm.dll
/*there is no dquote for path, and path points to right java version folder mentioned in ini file*/

if the above fix is not fruitful, then do not attempt anything else. most of the advice in this thread is misguided. some of these hacks might work temporarily or on certain machine configurations, but the contents of eclipse.ini are not trivial nor arbitrary. for the authoritative reference, see this [wiki page]:https://wiki.eclipse.org/eclipse.ini#specifying_the_jvm that explains the contents of the file. also note the see also links at the bottom of that page for more details about things like heap size, etc. do not delete eclipse.ini, ever. it is also inadvisable to remove the -vm or xmx options. if you do, you're asking for trouble.

here are references from the wiki page pertaining to your problem:

reference_1

reference_2

score:4

make sure eclipse.ini do not have multiple entry and used vm entry before vmargs:

-vm
  d:/java/jdk1.8.0_65/bin/javaw.exe
-vmargs
-dosgi.requiredjavaversion=1.8
-dosgi.instance.area.default=@user.home/eclipse-workspace
-xx:+useg1gc
-xx:+usestringdeduplication
-dosgi.requiredjavaversion=1.8
-xms256m
-xmx1024m

score:5

after trying the above solution of reducing the memory, eclipse starts working but hangs every time while loading the plugins from the work-space specially at org.eclipse.debug.core.

i found the solution here, eclipse hangs at splash screen, and want share it. hopefully it can help others as well.

score:7

in sts.conf file you need to check two important things to avoid create/allocate jvm issue

1. give the exact jdk install location:

--vm c:\program files\java\jdk1.7.0_01\jre\bin\javaw.exe

2. you need to give the exact java installed version:

--dosgi.requiredjavaversion=1.7

3. try to reduce the memory size:

--xx:maxpermsize=256m

score:8

  1. open the ecplise.ini file which is located in the eclipse installation folder.

  2. find & replace the line -vmargs with -vm d:\jdk1.6.0_23\bin\javaw.exe or just remove the line -vmargs and save it . now the problem is getting solved

score:9

you can also solve this issue by removing the value "256m" under the line "-launcher.xxmaxpermsize”.

score:9

i found a very easy solution for this. just delete eclipse.ini file, but backup first. i had this same problem many times and finally i deleted this and i no more have the problem.

it also increased loading time. now my eclipse starts faster than earlier.

score:12

  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”*

    -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.v20120522-1813
    -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
    **-vm “c:\program files\java\jdk1.7.0_07\bin\javaw.exe”** 
    -dosgi.requiredjavaversion=1.6
    -xms40m
    -xmx768m
    -declipse.buildid=v21.1.0-569685
    

score:18

  1. open the eclipse.ini file from your eclipse folder.

  2. it has some of add on configuration . find the line –launcher.xxmaxpermsize. now remove the the default value 256m and save it.

score:19

i removed eclipse.ini. i encountered this issue and removing the ini file solved it.

score:26

i know this is pretty old now but i have just had the same issue and the problem was i was allocating to much memory to eclipse that it could not get hold of. so open eclipse.ini and lower the amount of memory that is being allocated to -xmx xxmaxpermsize i changed mine to -xmx512m and xxmaxpermsize256m

score:114

try to add

-vm
d:\java\jdk1.6.0_29\bin\javaw.exe

fyi: refer sunblog

for others who might have problems with java 7, as per eclipse wiki - eclipse.ini vm_value (windows example)

this might not work on all systems. if you encounter "java was started but returned exit code=1" error while starting the eclipse, modify the -vm argument to point to jvm.dll

e.g.

-vm
c:\program files\java\jre7\bin\client\jvm.dll

also note that

the -vm option must occur before the -vmargs option, since everything after -vmargs is passed directly to the jvm

score:284

1. open the eclipse.ini file from your eclipse folder,see the picture below.

eclipse.ini

2. open eclipse.ini in notepad or any other text-editor application, find the line -xmx256m (or -xmx1024m). now change the default value 256m (or 1024m) to 512m. you also need to give the exact java installed version (1.6 or 1.7 or other).

max size

like this:

-xmx512m
-dosgi.requiredjavaversion=1.6

or

-xmx512m
-dosgi.requiredjavaversion=1.7

or

-xmx512m
-dosgi.requiredjavaversion=1.8

then it works well for me.


Related Query

More Query from same tag