+1  A: 

This should really be asked on http://superuser.com but have you tried setting your JAVA_HOME to the correct folder? Google for setting environment variables in Windows.

Topher Fangio
I followed these instructions:http://wso2.org/project/wsas/java/2.0-beta/docs/setting-java-home.htmlbut to no avail
Wallter
I hate to say it...but have you restarted?
Topher Fangio
Restarting is not necessary to install Java.
Thorbjørn Ravn Andersen
neither is JAVA_HOME necessary. It is the PATH which is used to find the javaw.exe. (JAVA_HOME is used by some other applications like ant, so it's not wrong setting it anyway)
Carlos Heuberger
A: 

Check Window > Preferences > Java > Installed JREs. Make sure there's something there; if there isn't, add one.

Did you recently update your JDK?

Drew Wills
I don't believe he can start Eclipse, so he won't see the Window menu...
Topher Fangio
Yes I tried to add the android add-on. But no (like Topher Fangio said,) I can't start Eclipse now.
Wallter
A: 

The JDK does not install a JVM in the default path.

Unless you need external tools to run like ant, the non-JDK is enough for Eclipse to run. The easiest way to install such a JVM is to go to http://java.com and let it install whatever it want to install.

Then double-click the Eclipse binary again.

Thorbjørn Ravn Andersen
Wallter
You went to java.com? Not javasoft.com?
Thorbjørn Ravn Andersen
+6  A: 

Open up Windows' System Properties from the control panel and hunt down the environment variables section:

  • Add a JAVA_HOME entry pointing to the directory where the JDK is installed (e.g. C:\Program Files\Java\jdk1.6.0_16)
  • Find the Path entry and add the following onto the end ;%JAVA_HOME%\bin
  • OK the changes
  • Restart eclipse so that it is aware of the new environment

Most Java tools will now be able to find your Java installation either by using the JAVA_HOME environment variable or by looking for java.exe / javaw.exe in the Path environment variable.

Rob Oxspring
When I added name:JAVA_HOMEvalue: "C:\Program Files (x86)\Java\jdk1.6.0_14;%JAVA_HOME%\bin"I still get the same error
Wallter
A: 

set JAVA_HOME variable and ad JAVA_HOME/bin to evnrionment path variable.

scienty
like this: "C:\Program Files (x86)\Java; C:\Program Files (x86)\Java\jdk1.6.0_14\bin" ? - it still didn't work :)
Wallter
+1  A: 

...in your current PATH

It said PATH, not JAVA_HOME.

Rightclick My Computer and choose Properties (or click Winkey+Pause), go to the tab Advanced, click the button Environment Variables, in the System Variables list at the bottom select Path (no, not Classpath), click Edit and add ;c:\path\to\jdk\bin to the end of the value.

Alternatively and if not present, you can also add JAVA_HOME environment variable and make use of it. In the same dialogue click New and add JAVA_HOME with the value of c:\path\to\jdk. Then you can make use of it in the Path by adding ;%JAVA_HOME%\bin to end of the value.

BalusC
It didn't work :) the data of the environment name: Path ---value: C:\Program Files (x86)\Java; C:\Program Files (x86)\Java\jdk1.6.0_14\bin
Wallter
Paths with spaces needs to be enclosed in quotes.
BalusC
+1  A: 

I had a co-worker with this exact problem last week. He fixed it by installing the x64 version of Eclipse and the x64 JDK.

Edit: he reused his old workspace after installing the necessary plugins, so that should not be much of an issue

laura
A: 

It turned out that all I needed to do was change the 'path' to:

"C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem; C:\Program Files (x86)\Java; C:\Program Files (x86)\Java\jdk1.6.0_14\bin"

that did it :)

Wallter
BTW, you should use jdk1.6.0_16 or later. Using jdk 1.6.0_14 you cannot use breakpoints correctly in Eclipse: https://bugs.eclipse.org/bugs/show_bug.cgi?id=279137
Csaba_H
A: 

I had the same issue (Windows 7 x86, 64bit JDK, 32bit Eclipse), and I found 2 solutions:

  • Install the 64 bit version of Eclipse (found by clicking the "Development Builds" tab on the downloads page.)
  • Install the 32bit version of the JDK.
Tim M
+1  A: 
VonC
A: 

walter your answer helped thanx

izzo
This is not an answer, it should be a comment to an answer!
Carlos Heuberger
A: 

There is an easier way to do that. Just run cmd x64. Type cmd x64 to search bar in start menu ant you will find it :) Or alternatively, you should set path to program files (x86) ... For example C:\Program Files (x86)\Java\jre6

Deividas M