In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains "what is the method of jdk installation and environment variable configuration under Win10". The content of the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "what is the method of jdk installation and environment variable configuration under Win10".
I. preparatory work
JDK8 download address
JDK8 download address 2
Since some readers say that Oracle needs an account to download, you don't want to bother to sign up for another one, so you can download it through download address 2.
A JDK installer, which is version 1.8, because the new JDK version doesn't have a lot of highlights, as shown in the following figure
II. Installation
Double-click the mouse to run
Select Yes, and then look like the following figure:
Click next:
I do not modify the installation path of JDK here, so there is no need to change it. Click next:
The installation prompt box for jre pops up during installation, as follows:
There is no need to change it here, click next, and you will see this:
Anyway, you are very bored, so why don't you talk about the meaning of this picture. Java has become a driver for 300 million people, and Java belongs to ORACLE. It should be clear that friends in the background here, and the new features of Java8 also make the replacement of JDK behind Java become dim. So now 90% of developers still choose Java8, and the latest Java14 is not interested, mainly because of the stability of Java8. Secondly, there is another point, that is, the JDK after Java may not be open source, which means that no matter what operations they have, people who used the previous version of Java will be one, Google, the old fox is very cunning, using a new language, so the preferred language for Android Studio compiler will become Kotlin, instead of Java, which is prepared in advance, and you should have completed the installation after seeing these.
This completes the installation, click "close", and then configure the environment variables.
Third, configure environment variables
The right mouse button "this computer" to select properties, after which a pop-up window will appear, click "Advanced system Settings"
As shown below:
Click "Environment variable" and you will see a picture like this:
The key is the following, user variables can be ignored:
Now that you have completed all the preparatory steps, the next step is to configure the environment:
1. Click "New" and a pop-up window will appear:
Variable name: JAVA_HOME
Variable value: C:\ Program Files\ Java\ jdk1.8.0_162 (the installation path of JDK, here your own installation path shall prevail)
After the input is completed, click to confirm, the first configuration is complete, and then proceed to the second step.
two。 Create a new CLASSPATH variable
Create a new CLASSPATH variable with a value of:
.;% JAVA_HOME%\ lib;%JAVA_HOME%\ lib\ tools.jar (note that there is a point in front). After configuration, it can be copied and pasted as shown in the following figure.
Then click OK to save the variable and proceed to the third step
3. Configure path, find path, double-click or click Edit
Then you can see that there is already a lot of content in path, so let's create a new one at the end:
Enter% JAVA_HOME%\ bin
Then click OK to save, go out and then click OK, and then click OK. At this point, the environment variable is configured, and the next step is to test whether there is any problem with the environment variable configuration.
Verify the configuration of environment variables
Shortcut key "win + R", open the run window, type cmd, and click OK to open the command line window
① java authentication
Enter java and enter to execute.
② javac authentication
Enter javac and enter to execute.
In this step, more people will enter javac and then there will be programs that are not internal or external commands or runnable programs. Later, I also looked at my own environment variables, and entered java, javac, java-version commands one by one is normal. And then some readers said that the content of Path in my system variable was less, and then I compared the content of other blogs. I did lose some of it, but it was normal for me to run javac.
If you find that javac doesn't work after configuration, add another item% JAVA_HOME%\ jre\ bin to Path.
Then click OK. Try javac again and see if it works.
In fact, it is normal for me to add this variable and not to increase it, but for readers with problems with javac, you can try it, maybe it will be OK? This discovery comes from a reader who sent a long comment, thank you.
Of course, there are friends who perform the above operation, enter javac is still not, I am surprised, but there are enthusiastic readers after I have experienced the above operation to find a successful way, I also make a record here, because maybe you can, that is to change the content of Path. First of all, let's take a look at the content of my current Path:
You will find that there is a% JAVA_HOME%, value that is the installation path of the previously configured JDK.
This is the path, so the way to modify it is to change the above reference path to the full path.
% JAVA_HOME%\ bin
% JAVA_HOME%\ jre\ bin
Change to, I am now in the installation path is D:\ Program Files\ Java\ jdk1.8.0_162, then change it to the following
D:\ Program Files\ Java\ jdk1.8.0_162\ bin
D:\ Program Files\ Java\ jdk1.8.0_162\ jre\ bin
Then save a meal of OK, and then open cmd and type javac to try:
Sure. Here is just a record of the solution, if you still can't, don't panic, keep looking, and record the process after the solution, tell me, I added to the article.
③ java-version authentication
Then type java-version and enter to execute. (note that there are spaces in the middle of java-version. I see too many careless people who fail by typing too few spaces. Remember, remember. )
At this point, the environment variables have been configured, if you are the operating system of win7, then the third step needs to be changed slightly.
QA: some people can not completely use the command to get the corresponding results after installing JDK. First, check whether the command is typed correctly, such as Chinese and English status, and spaces. If javac does not respond or prompt is not an internal or external command, check whether the installation file is complete and query whether there are jdk and jre in the installation folder.
If there is no problem with checking the installation file, try rebooting it. Different computer environment variables may take effect in different ways.
Thank you for your reading, these are the contents of "what is the method of jdk installation and environment variable configuration under Win10". After the study of this article, I believe you have a deeper understanding of what is the method of jdk installation and environment variable configuration under Win10. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.