According to Eclipsepedia, you need to tell Eclipse the exact path to your JAVA executable. You cannot use JAVA_HOME or any other variable name in this file!
Here we are going to show you how to make Eclipse use your JAVA_HOME directory so that when new versions (one of the umpteen updates) of JAVA are installed, Eclipse just works!
- You are using Windows Vista (or possible XP).
- You know the exact path to your Eclipse installation directory.
- You know the exact path of the JVM that your eclipse installation is utilizing.
- The variable JAVA_HOME is set up on your computer.
The next step is to enter the following command at the prompt:
mklink /D java %JAVA_HOME%
For those of you curious to see what happens when I list the directory contents:
The final step is now to put our symbolic link in the eclipse.ini file. So open up the eclipse.ini file (you can create a backup first if you like) and look for the lines that look like:
and replace them with:
Remember, that you are editing 2 lines (the -vm is on one line, while the java\bin\javaw.exe is on another)!
To confirm that everything works as promised, save your eclipse.ini file and start up eclipse!