Although this is an old question, I thought to add some more relevant info to the Accepted answer given by @Steffen Opel.
It is possible to install any number of versions of 32-bit JDKs and 64-bit JDKs in a 64-bit Windows OS. Also it is possible to install 32-bit Eclipse and 64-bit Eclipse in the same computer as well. But to run one of those platform related Eclipse (in OPs case 64-bit Eclipse) version, the machine should have matching “Environment Variables” configured for JDK. This can be done (should be done) without modifying
To run java without giving full path it is required to add file location for java.exe to
PATH environment variable. And also for some other third party utilities,
JAVA_HOME environment variable is required as well.
Normally java developers always need to have JDK installed (JRE is included in JDK). And
PATH is set to “bin” folder under JDK installation folder (in OPs case C:\Program Files\Java\jdk1.6.0_40\bin) while
JAVA_HOME is set to JDK installation folder (in OPs case C:\Program Files\Java\jdk1.6.0_40).
Here OP has only got 32-bit JDK but trying to use 64-bit Eclipse. So to fix the issue OP need to install 64-bit JDK. And change
PATH “Environment Variables” to match that installation location.
Here is the more complete steps:
- Download and install 64-bit JDKx.x.x_xx
Then open Windows Explorer, right click on Computer icon and select
Properties -> Advanced system settings.
It will open up
System Properties window, and in “Advanced” tab select “Environment Variables” to open up editing window.
Under the System variable section look for
name and click “Edit” button at the bottom section, if not
available click “New” and enter C:\Program Files\Java\jdk1.6.0_40
and click OK.
Then select the
PATH variable and click “Edit” and append
%JAVA_HOME%\bin; to the front or
%JAVA_HOME%\bin to the end of
the existing string. DO NOT over write the existing string, and click
OK -> OK ->OK to complete.
Now Eclipse will be open without the error.
If someone needs to use 32-bit Eclipse then default JDK path will be C:\ Program Files (x86) \Java\jdkx.x.x_xx
PATH Environment variables in Windows 10 there is an additional window will comes up as shown in picture below.