JDK installation
Article Directory
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.
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
Second, the configuration of Java environment variables
1. System variable 1: The variable name is JAVA_HOME
变量名:JAVA_HOME
变量值:(这是你自己安装JDK时的路径)
作用:定义一个变量,供其他地方使用
Copy the variable value to the path when you installed the JDK yourself
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
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;
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
Install IDEA
to download the official website address: https://www.jetbrains.com/idea/download/#section=windows
After the installation is complete, open IDEA, find SDKS and fill in JDK
to install a Chinese language pack plug-in