score:155

Accepted answer

this error occurs because your eclipse version is 64-bit. you should download and install 64-bit jre and add the path to it in eclipse.ini. for example:

...
--launcher.appendvmargs
-vm
c:\program files\java\jre1.8.0_45\bin\javaw.exe
-vmargs
...

note: the -vm parameter should be just before -vmargs and the path should be on a separate line. it should be the full path to the javaw.exe file. do not enclose the path in double quotes (").

if your eclipse is 32-bit, install a 32-bit jre and use the path to its javaw.exe file.

score:1

this is often caused by the (accidental) removal of the jre folder that is set in the eclipse configuration. you can try following these instructions from the eclipse wiki on how to configure the eclipse.ini file to include the the jre location, or alternatively, launch eclipse from the command prompt using vm arguments. i have tried them both myself and in my opinion, the command prompt option works much better.

once you are able to launch eclipse, make sure you verify the installed jre location under java --> installed jres in the preferences window.

score:2

since you didn't mention the version of eclipse, i advice you to download the latest version of eclipse luna which comes with java 8 support by default.

score:3

i also faced the error code when i upgraded my java version to 1.8. the problem was with my eclipse.

my jdk which was installed on my system is of 32 - bit and my eclipse was of 64 - bit.

so solve this problem i downloaded the 32 - bit eclipse.

imo this architecture miss match problem

plese match your architecture type of jdk and eclipse.

score:6

my solution: because all others did not work for me. i deleted the symlinks at c:\programdata\oracle\java\javapath. this makes eclipse to run with the jre declared in the path. this is better for me because i want to develop java with the jre i chose, not the system jre. often you want to develop with older versions and such

score:14

this is caused when java is updated. you have to delete in environement path : c:**programdata\oracle\java\javapath**

score:57

like vito mentions, this error occurs after java updates as the path:

c:\programdata\oracle\java\javapath

is added to the path environment variable, causing eclipse to run using the wrong java version.

to fix the problem:

1) right-click on computer and choose properties.

2) click advanced system settings

3) click environment variables...

4) find the path variable in the system variables section.

5) choose it and click edit...

6) find and delete the above mentioned path.

this fixed it for me. i should mention that i already have the path:

c:\program files\java\jdk1.7.0_21\bin

in the path variable, but the new path was added to the beginning of the path variable and therefore resolution would use that path first.


Related Query

More Query from same tag