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
JDK install a program, which is version 1.8, because the new version of the JDK are no big bright spot, as shown below,
installation
Double click the mouse,
select "Yes", then the following figure:
Click Next:
I am here does not modify the JDK installation path, so no need to change, click Next:
Setup box will pop up installation tips jre follows :
here without changes, click Next, and then you will see this:
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.
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"
in the following figure:
Click the "Environment Variables" and then will see this screen:
The key is the following, user variables can not control:
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:
variable name: JAVA_HOME
variable value: C: \ Program Files \ Java \ jdk1.8.0_162 (JDK installation path, here in your own installation path prevail)
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.
Then OK to save variables to the third step
3. Configure path , find the path, or double-click to edit point
and then you can see the path which has a lot of content, we create a new face at the end:
input % JAVA_HOME% \ bin
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,
Enter java, press Enter to implement
the input javac, press Enter to implement
the input java -version, press Enter to implement
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.