3 Answers
3

Firstly, within Eclipse go to Windows > Preferences > Java > Installed JREs. There should be at least one "JRE" listed and ticked - check if that is pointing to your installed JDK (ignore that it refers to them as installed JREs - you can point this to your JDK) - if its not, then edit the selected JRE and repoint it to you JDK directory

If you are still getting the error, then open up your eclipse.ini file (will be in the root of your eclipse install - open it in a text editor like notepad++ etc) and insert this at the top of the file:

I know it sounds crazy, but you need to have the -vm and the path on seperate lines. Split that and it should be ok..
–
rhindsMay 30 '11 at 11:09

see my second update in the question above...
–
JonathanMay 30 '11 at 12:25

1

looks like you are using a 64bit JDK but not JDK - the eclipse version needs to match the JDK, so either point to a 32bit JDK or install the 64bit Eclipse (see similar answer here: stackoverflow.com/questions/3781124/… )
–
rhindsMay 30 '11 at 13:00

I had the same issue. Firstly do what maven plugin asks you to do as rhinds mentioned. When I did this I still got the error. Later I realized that it was because of the fact that C:\WINDOWS\system32 has java.exe, javaw.exe and javaws.exe. It seems the executable somehow looks at these (probably the PATH), even though the JDK version is explicitly specified in eclipse.ini.