Java automated testing rookie article one: Java and IDEA environment deployment

The learning materials come from the industry's predecessor: Davieyang.DY, for personal learning only, intrusion and deletion.

JDK installation and environment variable configuration

Install JDK locally (java tool development kit: javaSE Development Kit)
official address to download JDK11 , find the required installation file jdk-11.0.6_windows-x64_bin.exe on the WIndows system, follow the instructions to download, you need to register an official Oracle account. It is recommended to use JDK11 because it has a better garbage collection mechanism than the previous generation.

The first step is to start the JDK installer

Take JDK11 as an example, double-click jdk-11.0.6_windows-x64_bin.exe to start the JDK installation program, the first interface is as shown below, just click Next:
Insert picture description here

The second step is to select the installation path and components. The
Insert picture description here
third step is to execute the installation process

The installation program will complete the process of copying, extracting, registering, and installing by itself, until the interface appears as shown in the figure, the installation is complete, click to close: the
Insert picture description here
fourth step is to configure the environment variables

Method 1: Open the control panel=="System=="Advanced system settings"Environment Variables"System Variables
Method 2: Right-click on My Computer, and click Properties in the pop-up menu.
Insert picture description here
Add the configuration item JAVA_HOME to the system variables, where the variable value is the path where the JDK is installed, if it is installed by default, it is the
same as the following figure:
Insert picture description here
Add the configuration item CLASSPATH to the system variables, as shown in the figure, the variable value is .;%JAVA_HOME\lib ;%JAVA_HOME%\lib\tools.jar
Note that it represents the current path, which depends on the path to find the class file when Java is executed:
Insert picture description here
find the Path in the system variables, and add the variable value %JAVA_HOME%\bin for this item; %JAVA_HOME%\jre\bin; pay attention to the semicolon
, separate multiple variables with ;, otherwise it will not only fail to take effect, but also affect other configurations: the
Insert picture description here
fifth step of environment verification

Enter java -version on the command line, and the following output is correct:
Insert picture description here
Enter javac on the command line, and the following output is correct:
Insert picture description here
At this point, the local Java environment is set up.

Guess you like

Origin blog.csdn.net/weixin_52385863/article/details/114241325
Recommended