1. Download
http://www.oracle.com/technetwork/java/javase/downloads/index-jsp-138363.html Download the appropriate JDK installation package (with the JRE installer in the JDK installation package).
JDK (Java Development Kit) Development Kit, JRE (Java runtime enviroment) runtime environment. If Java development requires the installation of the JDK and JRE, only the JRE is required to run the Java program.
2. Installation
Install the JDK and JRE under the same folder. Double-click the JDK.exe installation, install the JDK for the first time, install the JRE for the second time, install the program in a different folder, and put two folders under the same Java folder. Such as:
3. Configure Environment variables
3 environment variables, namely Java_home, PATH, ClassPass.
In the system variable:
Java_home (New): value is the installation directory of the JDK (for example: E:\JVA\jdk1.7.0)
CLASSPATH (New): value is.; %java_home%\lib;%java_home%\lib\tools.jar
PATH (Append): Enter%java_home%\bin;%java_home%\jre\bin at the end of the variable value; (Note that the value of the original path variable is not at the end; add; re-enter)
4. Verify that the configuration is successful
Run cmd, enter java-version (with spaces), display Java version number is successful.
Install configuration Java