Download the JDK (Java Development Kit), and all Java programs depend on him. www.oracle.com Direct Download
Install JDK (fool-mounted, next step):
After the installation is complete, the JDK deployment test first: The JDK environment variable configuration, JDK requires three environment variables, namely: Java_home, CLASSPATH, PATH. where CLASSPATH and PATH must be configured, Java_home is optional.
Right-click on "My Computer"--"properties"--"advanced" pop-up window after clicking the Environment Variables button
(Note: The difference between a user variable and a system variable is that the user variable is only for the user who is currently logged in to Windows, and the system variable works for all users) system variables--NEW--Variable name "java_home", Variable value "JAVA installation path"
System variable-double-click path (if not present, to create new), add "%java_home%\bin" variable value, where%java_home% represents the current value of the Java_home just added (D:\Program files\java\ jdk-9) Description: The value of the PATH environment variable is a list of executable path, when the execution of an executable file, the system first in the current path to look for, if not found, then the path of the various paths set down to find, until found, if the path can not be found, will error. Both the Java compiler (Javac.exe) and the Interpreter (Java.exe) are in the Bin directory under the installation path. In order to execute Java programs using them in any path, you should add the path they are in to the path variable. (Win10 system interface)
The CLASSPATH environment variable specifies a search list of classes that are used by Java programs to compile or run. The process of finding a class for a Java Virtual machine differs from the process that Windows looks for executable commands (. exe,.bat or. cmd and. dll dynamic-link libraries). It is not looking under the current path, so be sure to include the current path when setting the environment variable CLASSPATH. System variable--new--Variable name "CLASSPATH", variable value is ".; %java_home%\dt.jar;%java_home%\lib\tools.jar; "". " Represents the current path, which means that the Java virtual machine goes to the current path (the current working directory of Java Virtual machines) and looks for the class to be used; The value of the Java_home is the installation path of the JDK, which declares a value separately so that if the JDK path changes, You only need to modify the value of Java_home, you do not need to modify every configuration, which is why Java_home can not be configured. When you need to use the path to the JDK, you can refer to it in "%java_home%" way. Test whether the JDK works correctly: open cmd
Enter Java-version Press ENTER to return the version information for the current JDK, which indicates that the JDK configuration was successful.
Java JDK Download installation and configuration