1. Go to Oracle's website [1] To download the latest version of the Java SE installation package.
Select "Accept License agreement" and select the installation package under the appropriate system version.
2. When the download is complete, double-click the installation package and install it by default. such as "Jdk-9_windows-x64_bin.exe"
3. Configure the system environment after the installation is complete. System variables to modify the "Java_home", "PATH", "CLASSPATH" and other environment variable information, below the WIN10 (64bit) system of JAVA version 9 as an example.
(1) "Control Panel"-"System and Security"-"system"-"Advanced system Settings"-"Environment variables"
(2) "System variables"-Add or edit variable "java_home", value "C:\Program files\java\jdk-9" (Native JDK installation path)
(3) "System variable"-add or edit the variable "CLASSPATH" with the value ".; %java_home%\lib\; " (The path of the Lib folder under the JDK installation path of this machine, if the JAVA version is 1.5 above, this item can be omitted )
(4) "System variables"-Edit variable "path", add two entries, value "C:\Program files\java\jdk-9\bin" (Native JDK installation bin path) and "C:\Program Files\java\jre-9\bin" (Native JRE Installation bin path)
4. Verify that the Java environment is installed and configured successfully.
(1) Bring up the command line window: "Start"-"Run", enter "cmd" carriage return
(2) Command Line window input command enter "Java–version", "Java", "Javac" can appear the correct prompt message indicates that the Java installation configuration is successful.
[1] http://www.oracle.com/technetwork/java/javase/downloads/index.html
Java Installation and Environment configuration