JDK installation and environment configuration (detailed graphics)

I. Introduction

If you are a Java developer, you will use the Java development environment configuration, which is the basis for development. This article is only suitable for Java "developers" who are just getting started, and it is also an input and output of their own knowledge. In fact, the installation of JDK and the configuration of environment variables are very simple, but it is difficult for people who are in contact with it for the first time. First briefly introduce JDK, the full name is Java Development Kit, java development toolbox. It is understood that most of the jdk of the domestic java system is still version 1.8.

Two, JDK installation

JDK official website download address icon-default.png?t=N6B9https://www.oracle.com/java/technologies/downloads/

 The above is the official website for JDK installation. If necessary, please download it directly with me.

Link: Click here (extract code tbtb) 
Extract code: tbtb

3. Environment variable settings

3.1 Configure environment variables after installing JDK

This PC (right-click the mouse) Properties Advanced System Settings Advanced Environment Variables

 

3.2 System Variables New

Variable name: JAVA_HOME
Variable value: fill in the jdk installation directory (for example : C:\Program Files\Java\jdk1.8.0_311)

 

3. 3 System Variables Find the Path variable Edit

Win10 user variable configuration method
New (2 times) fill in %JAVA_HOME%\bin and %JAVA_HOME%\jre\bin respectively

 

 

3.4 System Variables New

Variable name: CLASSPATH
Fill in the variable value   .;%JAVA_HOME%\lib;%JAVA_HOME%\lib\tools.jar (note the first point)

 

 

Fourth, verify whether the configuration is successful

After the system variables are configured, verify whether the configuration is successful, and Win+R executes cmd to enter the dos command.

4.1 Executing the java command appears

 4.2 Executing javac appears

 4.3 Executing java -version appears

 If the above appears, it means that the task of installing and configuring environment variables is completed.

 

Guess you like

Origin blog.csdn.net/wolves7917/article/details/131775174