Setting up Eclipse with JRE Path
You can add this line to eclipse.ini
:
-vm
D:/work/Java/jdk1.6.0_13/bin/javaw.exe <-- change to your JDK actual path
-vmargs <-- needs to be after -vm <path>
But it's worth setting JAVA_HOME
and JRE_HOME
anyway because it may not work as if the path environment points to a different java version.
Because the next one to complain will be Maven, etc.
Add this to eclipse.ini:
-vm
your_java_path\bin\javaw.exe
...but be aware that you must add these lines before -vmargs
I have several version of JDK (not JRE) instaled and I launch Eclipse with:
C:\eclipse\eclipse.exe -vm "%JAVA_HOME%\bin\javaw.exe" -data f:\dev\java\2013
As you can see, I set JAVA_HOME
to point to the version of JDK I want to use.
I NEVER add javaw.exe in the PATH.
-data
is used to choose a workspace for a particular job/client/context.
Add the following -vm D:/Java/jdk1.6.0_30/bin/javaw.exe in the begin of eclipse.ini like this :
-vm
D:/Java/jdk1.6.0_30/bin/javaw.exe
-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20130807-1835
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
1024M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
1024m
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vmargs
-Dosgi.requiredJavaVersion=1.6
-Xms1024m
-Xmx2048m
This may sound dumb, but it may be a fresh, or damaged install, so is the JDK installed? If not, go to the download site and download the latest version of Java JRE. Like I said, this may sound dumb, but it solved my problem.
http://www.oracle.com/technetwork/java/javase/downloads/index.html