[Java programming language] - JDK installation

JDK installation



insert image description here


1. Selection and download of JDK

1. The choice of JDK

The current version of JDK is updated very quickly, and it has reached JDK20. But for ordinary developers or learners, choosing a more stable JDK is a more appropriate choice. The current stable JDK versions are JDK8 and JDK11.
insert image description here

2. JDK download

The following is the official website for downloading, and you can also go to Huawei or other mirror websites to download.

1. JDK official website download address: https://www.oracle.com/cn/java/technologies/downloads/

2. Select the JDK version and operating platform
3. Click the picture below to start downloading
insert image description here

Second, the configuration of Java environment variables

insert image description here
insert image description here
insert image description here

1. System variable 1: The variable name is JAVA_HOME

变量名:JAVA_HOME
变量值:(这是你自己安装JDK时的路径)
    
作用:定义一个变量,供其他地方使用

insert image description here
Copy the variable value to the path when you installed the JDK yourself
insert image description here

insert image description here

2. System variable 2: PATH

Double-click the PATH variable under system variables to create two new paths

Function: Let the system recognize java, javac, javap and other commands in any path

%JAVA_HOME%\bin
%JAVA_HOME%\jdk\bin

insert image description here

3. System variable three: CLASSPATH
(1). If there is a CLASSPATH variable, select it and click Edit

(2), if not, click New (new)... Create new

(3), input

Function: tell the jvm what path to use or execute the class on, so that the JVM can load the class file, .; indicates the current path, tools.jar and dt.jar are the class library path

变量名:CLASSPATH
变量值:.;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar;

insert image description here

4. Verify that the JDK is installed successfully

After all the configurations are completed, test the JDK, win+R, enter cmd, and open the command window

输入:java -version

insert image description here
insert image description here
Install IDEA
to download the official website address: https://www.jetbrains.com/idea/download/#section=windows

insert image description here
After the installation is complete, open IDEA, find SDKS and fill in JDK
insert image description here
to install a Chinese language pack plug-in
insert image description here

Guess you like

Origin blog.csdn.net/guanguan12319/article/details/130219515