Install and configure JDK under Windows

Preliminary preparations for installing JDK :

1 : Download and install JDK 

JDK official download site: http://www.oracle.com/technetwork/java/archive-139210.html

2 : Configure the environment variables of JDK 

After the installation is complete, you need to set the environment variable so that the compiler can be used normally. Right-click "Computer", select "Properties", select "Advanced System Settings" on the left, select the "Advanced" tab above, and click the "Environment Variables" button in the lower right corner.

The next pop-up dialog box will appear user variables and system variables. User variables are valid for the current login account, and system variables are valid for all users. Readers can set them according to their needs.

3 : Method steps

Click New in the system variable, fill in JAVA_HOME for the variable name, fill in the JDK installation path for the variable value, and fill in "" C:\Program Files\Java\jdk1.7.0_80 " here.

Click New Variable in System Variables, fill in CLASSPATH for the name, and fill in " .;%JAVA_HOME%\lib;%JAVA_HOME%\lib\tools.jar " for the variable value. Be careful not to forget the dot in front and the semicolon in between.

Find the Path variable in the system variables, which comes with the system and does not need to be created. Double-click Path, since the original variable value already exists, you should add " ;%JAVA_HOME%\bin;%JAVA_HOME%\jre\bin " after the existing variable . Note the preceding semicolon.

 

At this point, the required environment variables have been configured. Verification method: enter the cmd command in the run box, enter java after pressing Enter, and the following screen will appear after pressing Enter

 

Enter javac, press Enter and the following screen appears, indicating that the setting is successful.

 

 

Guess you like

Origin blog.csdn.net/xiaodaiwang/article/details/110804097