I recently changed my path so I could follow along in the Head First Java book and I had Eclipse before. Now when I try to get onto Eclipse again it won\'t open because it s
Go to System Properties > Advanced > Enviroment Variables
and look under System variables
JAVA_HOME
variableEven though Eclipse doesn't consult the JAVA_HOME
variable, it's still a good idea to set it. See How do I run Eclipse? for more information.
If you have not created and/or do not see JAVA_HOME
under the list of System variables
, do the following:
New...
at the very bottomVariable name
, type JAVA_HOME
exactlyVariable value
, this could be different depending on what bits your computer and java are.
C:\Program Files\Java\jdk1.8.0_60
C:\Program Files\Java\jdk1.8.0_60
C:\Program Files (x86)\Java\jdk1.8.0_60
If you have created and/or do see JAVA_HOME
, do the following:
System variables
that you see JAVA_HOME
inEdit...
at the very bottomVariable value
, change it to what was stated in #3 above based on java's and your computer's bits. To repeat:
C:\Program Files\Java\jdk1.8.0_60
C:\Program Files\Java\jdk1.8.0_60
C:\Program Files (x86)\Java\jdk1.8.0_60
PATH
variableSystem variables
with PATH
in itEdit...
at the very bottomNew
C:\Program Files (x86)\Java\jdk1.8.0_60
OR C:\Program Files\Java\jdk1.8.0_60
depending on the bits of your computer and java (see above ^).Enter
and Click New
again.C:\Program Files (x86)\Java\jdk1.8.0_60\jre
OR C:\Program Files\Java\jdk1.8.0_60\jre
depending on the bits of your computer and java (see above again ^).Enter
and press OK
on all of the related windowsVariable value
textbox (or something similar) drag the cursor all the way to the very end;
) if there isn't one alreadyC:\Program Files (x86)\Java\jdk1.8.0_60
OR C:\Program Files\Java\jdk1.8.0_60
;
)C:\Program Files (x86)\Java\jdk1.8.0_60\jre
OR C:\Program Files\Java\jdk1.8.0_60\jre
eclipse.ini
eclipse.ini
file and copy-paste it in the same directory (should be named eclipse(1).ini
)eclipse.ini
to eclipse.ini.old
just in case something goes wrongeclipse(1).ini
to eclipse.ini
Open your newly-renamed eclipse.ini
and replace all of it with this:
-startup
plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.100.v20110502
-product
org.eclipse.epp.package.java.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vm
C:\Program Files\Java\jdk1.8.0_60\bin\javaw.exe
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx1024m
XXMaxPermSize
may be deprecated, so it might not work. If eclipse still does not launch, do the following:
eclipse.ini
eclipse.ini.old
to eclipse.ini
eclipse -vm C:\Program Files (x86)\Java\jdk1.8.0_60\bin\javaw.exe
Try updating your eclipse and java to the latest version. 8u60 (1.8.0_60
) is not the latest version of java. Sometimes, the latest version of java doesn't work with older versions of eclipse and vice versa. Otherwise, leave a comment if you're still having problems. You could also try a fresh reinstallation of Java.