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.
Check Window > Preferences > Java > Installed JREs. Make sure there's something there; if there isn't, add one.
Did you recently update your JDK?
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.
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.
set JAVA_HOME variable and ad JAVA_HOME/bin to evnrionment path variable.
...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.
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
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 :)
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.
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