1, download and install the JDK, the latest version is 1.8.0, official website: http://www.oracle.com/technetwork/java/javase/downloads/index.html
Click on the selected JDK, go to the appropriate download page, accept license, select the appropriate version
2.JDK environment variable configuration:
- Modify My Computer--advanced environment variable---->java_home, without which the variable value is the JDK installation directory, my installation directory is C:\Program files\java\jdk1.8.0
- Modify My Computer--high-level environment variable->classpath, without which the variable value is: ";%java_home%\bin;%java_home%\jre\bin; ”
- Modify My Computer--high-level environment variable->classpath, without which the variable value is: ".; %java_home%\lib;%java_home%\lib\tools.jar ". Be careful not to forget the front dot and the middle semicolon.
3. Verification
Enter cmd command in the Run box, enter java-version after carriage return, output the corresponding version
Or the Javac command appears as you can:
JDK Download and installation