Issue 0, teach you step by step about jdk installation and configuration environment

jdk installation and configuration environment

This article is to make up for the jdk installation and configuration that was not prepared in the previous article.
To learn JAVA, you must install JDK (java development kit java development tool kit), configure the environment, and then you can learn JAVA. The following is Tutorial for downloading and installing JDK:

JDK download and installation:

jdk download address
Or you can contact me via private message and I will send you my installation package. After downloading, open the installation package
Insert image description here
and click Next here.
Insert image description here
Set the installation path. If you are a novice, it is recommended to install directly to the default path, which is less error-prone. Of course, if you consider the future and do not want to install everything on the system disk, you can change the path selection. This path must be written down. It will be used later. .
Insert image description here
After setting the path and pressing Next, wait for the installation. Make a cup of tea and take a rest.
Insert image description here
After the installation is complete, you only need to press Finish, and we can enter the next step.

java environment configuration

Environment configuration is a step that is easy to make mistakes, but as long as you follow the steps, it can be completed easily.
First, open a folder or "This PC", find This PC in the side navigation bar, right-click and select the Properties button.
Insert image description here
Select "Advanced System Settings" on the system interface Insert image description here
to display the system properties window, where you select environment variables.
Insert image description here
In the system variables in the lower column, click NewInsert image description here

I don’t know why this picture was missing, so I added it later. As long as you can see the variable names and values ​​here, it will be fine.
We set the variable name to

JAVA_HOME

The variable value is set to the path of the installed jdk (if it is not the default path, please change the path to the path you set)

C:\Program Files\Java\jdk-14.0.2

OK
Create a new variable Class_path
Insert image description here
variable named:

CLASS_PATH

The variable values ​​are:

%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar

Copy the text here where the pictures and text are inconsistent, I'm just too lazy to change the pictures.
Then modify the path variable and add a new value to it.
Insert image description here

值1:%JAVA_HOME%\bin
值2:%JAVA_HOME%\jre\bin

At this point, the configuration of the Java environment has been completed.

Test your own java environment configuration

Press window+R, enter cmd in the search box to enter the command indicator, and enter in the small black box

java -version

If the message shown in the figure below appears, it is successful.
Insert image description here
Now you can try to write programs in java.

Tutorial Plan & Index Link: Index Address

Guess you like

Origin blog.csdn.net/weixin_43035795/article/details/118253055