1: Environment
2: Install JDK Two installation prompts appear during installation of the installation directory. The first time is to install the JDK, and the second is to install the JRE. It is recommended that all two are installed in a different folder in the same Java folder. (cannot be installed in the Java folder root directory, JDK and JRE installed in the same folder will be error)
3: After installing the JDK (D:\Program files\java\jdk1.7.0_80), configure environment variables computer → properties → advanced system settings → advanced → environment variables
4: Environment variables
- System variables → new java_home variable. Variable value fill in the JDK installation directory D:\Program files\java\jdk1.7.0_80
- system variable → find path variable → edit, enter%java_home%\bin;%java_home%\jre\bin at the end of the variable value; (Note that the value of the variable in the original Path is not at the end; number, if not, first enter; number and then enter the above code)
- system variable → new CLASSPATH variable, variable value filled in.; %java_home%\lib;%java_home%\lib\tools.jar (note the first point) system variable configuration complete
5: Detection
Run the cmd input java-version
Java JDK environment variable configuration