Java installation and environment construction

Java installation and environment construction

Java installation and environment construction

  1. The first step is to check whether there is a Java environment on the computer. If java has been installed before, uninstall it cleanly.

  2. The second step is to create a java folder where you want to install Java, and create jdk and jre folders inside the folder.
    Insert picture description here

  3. The third step is to double-click to install jdk and jre.
    Insert picture description here

  4. The installation process is as follows
    Insert picture description here
    Insert picture description here

After the jdk installation is complete, the automatic pop-up window will install jre.
Insert picture description here
Insert picture description here

Click Close to complete the installation.
5. The fourth step is to configure system environment variables.
Right-click this computer properties
Insert picture description here

Click Advanced system settings
Insert picture description here

Click on environment variables
Insert picture description here

Note that the system variable is selected, and then click New.
Insert picture description here

Variable name: JAVA_HOME
Variable value: E:\java\jdk (this value is the file directory of the jdk we created at the beginning) and
click OK.
New again (still in system variables)
Insert picture description here
Insert picture description here

Variable name: CLASSPATH
variable value: ,;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar;
At this time, find Path in the system variable and add the value to it.
Insert picture description here
Insert picture description here

Click New and enter the value: %JAVA_HOME%\bin;
select it and click to move, as shown in the figure above, click OK.
6. The environment is successfully configured as shown in the figure below:
Insert picture description here
Insert picture description here

  1. Verify that the Java environment is successfully installed.
    Open the run, enter cmd, and click OK.
    Insert picture description here

Enter the command: javac -version
Insert picture description here

Carriage return
Insert picture description here

Display version information
Enter the command: java -version
Insert picture description here

Display version information
8. Successful installation.

File extraction

Link: https://pan.baidu.com/s/1i-nQP6gjAZMddb04XLJdQw Extraction code: gh8g

Guess you like

Origin blog.csdn.net/MIRACLE_Ying/article/details/112046142