In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Computer Software News >
Share
Shulou(Shulou.com)05/31 Report--
I believe that everyone will change the computer system will encounter the "JDK environment variable configuration" situation, which for computer programmers or programmers, may not be very difficult, but like ordinary users, want to configure, you need tutorials to assist, the following editor through this article to tell you how to configure JDK environment variables in Win7, let's take a look at the tutorial!
First, download
JDK is free, you can download it directly from this site, select the standard version of Java directly, and click on it. You must accept the agreement here, otherwise you can't download it.
Second, install JDK
1. Find the downloaded JDK and double-click to install it.
2. First of all, the installation wizard will pop up and Next directly. (as shown in the following figure:)
3. It is recommended to modify the default installation path here, of course, it may not be modified. If you change the path, it is best not to put it in Chinese or a directory with spaces, so as to avoid strange problems in the future. (as shown in the following figure:)
4. I modified the default path and directly changed the default path C:\ Program Files\ Java\ jdk1.8.0_131\ to C:\ Java\ jdk1.8.0_131\. (as shown in the following figure:)
5. After the JDK installation is completed, the installation JRE; will be reminded to modify the default installation path and place it under C:\ Java\ jre. Because JRE is included in JDK, you can choose not to install it. (as shown in the following figure:)
6. After modifying the path, Next directly. The installation can be completed. (as shown in the following figure:)
III. Configuration of environmental variables
Environment variables generally refer to the parameters used in the operating system to specify the operating system environment. In fact, this sentence is not very easy to understand, let's give an example. Such as path, when the system is asked to run a program without telling it the full path where the program is located, the system will not only look for the program under the current directory, but also go to the path specified in path. Colloquially speaking, I don't have what you want here, so what should I do? go to the place mentioned in path.
After a brief understanding of the environment variables, right-click my computer-> Properties-> Advanced system Settings-> Environment variables. (as shown in the following figure:)
Click New-> variable name: JAVA_HOME under system variable, variable value: your java path, for example, this is my installation path: C:\ Java\ jdk1.8.0_131. (as shown in the following figure:)
When you are finished, find Path- > double-click-> add [% JAVA_HOME%\ bin;%JAVA_HOME%\ jre\ bin;] at the beginning of the system variable. The semicolon in square brackets must be a semicolon in English. (as shown in the following figure:)
Click New-> variable name: classpath under system variable, variable value:. ;% JAVA_HOME%\ lib\ dt.jar;%JAVA_HOME%\ lib\ tools.jar
There is a point at the front, which represents the current path, which must be added. (as shown in the following figure:)
This is the end of the installation and configuration of JDK. Let's check whether the installation is successful or not.
Win + R enter CMD. (as shown in the following figure:)
Pop up the command line and type Java-version directly. If the following appears, it means that the running environment of JRE-Java is installed successfully. It's not enough to develop this as a Java. (as shown in the following figure:)
Continue to enter javac. (as shown in the following figure:)
Continue to enter Java. (as shown in the following figure:)
Only when the above appears, can you prove that JDK is fully installed successfully.
Fourth, the significance of the configured variables
Description: the variable names of environment variables are not case-sensitive, but it is easy to distinguish them in uppercase.
JAVA_HOME: this is the installation path of jdk
In this way, even if you need to change the jdk path later, you can modify the JAVA_HOME directly, and you don't have to modify the path and classpath.
Path:%JAVA_HOME%\ bin;%JAVA_HOME%\ jre\ bin
Point to the bin directory so that when you call javac to compile the source file, or when you call the java command to run the bytecode file, first look in the current directory, and if you can't find it, you'll find it in the path path.
Classpath:.;% JAVA_HOME%\ lib;%JAVA_HOME%\ lib\ tools.jar
Point to the file path that needs to be run. In fact, this classpath does not need to be configured after JDK5 and will not be affected in future development.
All right, the above is the editor to bring you about the "Win7 configuration JDK environment variables" all the content, through the above tutorial steps, you can easily configure variables, hope to help you.
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.