JDK installation and configuration environment variables (Win10)

Foreword

Why write this article, it is because I do not want to go to Baidu search someone else's article, so write your own for your records.

Ready to work

JDK8 Download

Here Insert Picture Description
JDK install a program, which is version 1.8, because the new version of the JDK are no big bright spot, as shown below,
Here Insert Picture Description

installation

Double click the mouse,
Here Insert Picture Description
select "Yes", then the following figure:
Here Insert Picture Description
Click Next:
Here Insert Picture Description
I am here does not modify the JDK installation path, so no need to change, click Next:
Here Insert Picture Description
Setup box will pop up installation tips jre follows :
Here Insert Picture Description
here without changes, click Next, and then you will see this:
Here Insert Picture Description
anyway, you are very bored, it is better to talk about the meaning of this figure, Java has become 300 million people drive, Java belongs to ORACLE Corporation, where do the background should be more of a friend clear, and new features Java8, but also to the back of the Java JDK replacement become bleak, so now there are 90% of people chose Java8 developers, the latest Java14 nobody cares, mainly because of the stability of Java8. Secondly Another point is the future of Java JDK may not be open source, which means that no matter what they have to show behind the operation, using the previous version of Java who will be the one army, then Google is very cunning old fox using the new language, so Android Studio compiler subsequent preferred language becomes Kotlin, rather than Java, and also be a rainy day, you should read the installation has been completed.

Here Insert Picture Description
This installation is complete, click "Close", and then configure the environment variables.

Configuration environment variable

Right-click "This Computer" select Properties, then there will be a pop, click on the "Advanced System Settings"
Here Insert Picture Description
in the following figure:

Here Insert Picture Description
Click the "Environment Variables" and then will see this screen:
Here Insert Picture Description
The key is the following, user variables can not control:
Here Insert Picture Description
At this point you have completed all of the preparatory steps, the next step is to configure the environment:
1. Click "New" will appear a pop:
Here Insert Picture Description
variable name: JAVA_HOME
variable value: C: \ Program Files \ Java \ jdk1.8.0_162 (JDK installation path, here in your own installation path prevail)

Here Insert Picture Description
After entering point confirmed completion, the first configuration is complete, followed by a second step
2. Create CLASSPATH variable, the variable value:
;.% The JAVA_HOME% \ lib;%% the JAVA_HOME \ lib \ the tools.jar (Note that there is a point in front of), Then configured as shown below, there is a copy and paste.
! [Insert Picture description here] (https://img-blog.csdnimg.cn/20200324145920366.png

Then OK to save variables to the third step

3. Configure path , find the path, or double-click to edit point
Here Insert Picture Description
and then you can see the path which has a lot of content, we create a new face at the end:
Here Insert Picture Description
input % JAVA_HOME% \ bin

Here Insert Picture Description
Then OK to save, and then point out determined after, and then point to determine, at this point the environment variable configuration is completed, the next step is to test the environment variable configuration has no problem.

Verification environment variable configuration

Shortcuts "win + R", open the Run window, type cmd, and click OK to open a command line window,
Here Insert Picture Description

Enter java, press Enter to implement
Here Insert Picture Description
the input javac, press Enter to implement
Here Insert Picture Description
the input java -version, press Enter to implement
Here Insert Picture Description
this point, the environment variable configuration is completed, and if you are win7 operating system, then the third step is to make a little change.

Published 51 original articles · won praise 17 · views 20000 +

Guess you like

Origin blog.csdn.net/qq_38436214/article/details/105071088