Download, Install and setup java 8 in windows


First, Download java 8 from www.oracle.com/jdk8-downloads



Now, Set up environment variable if you want to run from CMD,
Later we will learn how to setup java 8 in eclipse


Setting the JDK path in windows >
  • Go to My Computer, right click on properties
Click Advanced System setting, Environment Variable, New..



Then we will set environment variables
  1. JAVA_HOME &
  2. PATH  >


1. set JAVA_HOME >
Variable name : JAVA_HOME
variable value: C:\Program Files\Java\jdk1.8.0_05 (Directory in which java 8 has been installed)

Click OK.


2. set PATH  >
Again click on New..
Then enter -
Variable name : PATH
variable value: C:\Program Files\Java\jdk1.8.0_05\bin
Click OK.


Ensure environment variable is set properly >
Ensure version which you are running is java 8 -
Go to cmd >
C:\Users\ankitmittal>java -version
java version "1.8.0_51"
Java(TM) SE Runtime Environment (build 1.8.0_51-b16)
Java HotSpot(TM) 64-Bit Server VM (build 25.51-b03, mixed mode)

C:\Users\ankitmittal>


Read more in detail >

Download and install JDK, Setting environment variables JAVA_HOME & JDK PATH temporarily and permanently in windows, What is a path? need to set PATH variable?




2) Setup java 8 in eclipse

Step 2.1:
click Windows, Preferences,

Step 2.2:
Type jre
Go to Installed JREs (which is under Java > Installed JREs)
Then click Add..

Step 2.3:
Select Standard VM >


Step 2.4:
Type >
JRE home: C:\Program Files\Java\jdk1.8.0_05\
JRE name: jdk1.8.0_05
Click Finish

Step 2.5:
Finally you will see screen like this >
Where you can see jdk1.8.0_05 is checked, that means java 8 is configured in eclipse now.

Now, we will have both jdk and jre available. (As jre is part of jdk)
Read in detail  : Differences between JDK, JRE


Labels: Java 8
Must read for you :