Java installation and environment construction
Java installation and environment construction
-
The first step is to check whether there is a Java environment on the computer. If java has been installed before, uninstall it cleanly.
-
The second step is to create a java folder where you want to install Java, and create jdk and jre folders inside the folder.
-
The third step is to double-click to install jdk and jre.
-
The installation process is as follows
After the jdk installation is complete, the automatic pop-up window will install jre.
Click Close to complete the installation.
5. The fourth step is to configure system environment variables.
Right-click this computer properties
Click Advanced system settings
Click on environment variables
Note that the system variable is selected, and then click New.
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)
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.
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:
- Verify that the Java environment is successfully installed.
Open the run, enter cmd, and click OK.
Enter the command: javac -version
Carriage return
Display version information
Enter the command: java -version
Display version information
8. Successful installation.
File extraction
Link: https://pan.baidu.com/s/1i-nQP6gjAZMddb04XLJdQw Extraction code: gh8g