One, download the installation JDK (Java Developmet kit):
Go to http://www.oracle.com/download jdk
Clicking on the download below the JDK will jump to the following screen:
Tick the consent agreement to download your JDK for the operating system.
After downloading the installation without brain operation, just pay attention to try not to install to the C drive.
Second, configure environment variables
The configuration environment variable is in order to give the system a path, so straightforward to find the instructions you want to use, instead of having to go into this path each time. For example, in the development of Java is often used to Javac.exe, Java.exe. They were in the D:\JDK\java\bin I installed (customized when the path was installed) and I needed to add this path to the default path of CMD each time it was automatically retrieved.
Computer--Properties--Advanced system settings--environment variables
1, create a new JAVA_HOME:JDK installation directory where you can find lib,bin these folders
2. Modify the path environment variable to point to the bin directory of the JDK so that you do not need to type a large string of paths when compiling and executing programs under the console. The Setup method is to preserve the contents of the original path and add%java_home%\bin to it. Percent of a reference to the path that was created
Locate the PATH environment variable and add:"%java_home%\bin;", give him the path to the bin file
3, New CLASSPATH: First of all to note is the front of the ".;". This is the class file that tells the JDK to find the current directory when searching for class
Classpath=.; %java_home%\lib;%java_home%\lib\tools.jar
But!!!!!
Since the jdk-9 has been no tools.jar and Dt.jar, and do not need to configure these jars in the classpath, configuration can refer to:
JAVA_HOME=JDK Installation Path
JRE_HOME=JRE Installation Path
path=;%java_home%\bin;%jre_home%\bin
Classpath=.; %java_home%\lib;%jre_home%\lib
Support for the Java environment variable is configured, in the CMD input Java or javac have something to do
JDK download Installation and Java environment variable configuration small white detailed introduction