WIN10 system Java environment variable setting method

Source: Internet
Author: User

WIN10 system Java environment variable setting method introduction:

1. First, right click on "This Computer" and select "Properties". As shown in Figure 1

Figure 1
2, select "Advanced system settings." As shown in Figure 2
Figure 2
3, choose "Environment variable". As shown in Figure 3
Figure 3
4, select "New". As shown in Figure 4
Figure 4
5, click New, it will appear this, the variable named "java_home" (copy my quotes within the content can be, without quotes, the same below), variable value, must be the path of their own JDK, such as my installation path is e:java\jdk\, path issues need attention. As shown in Figure 5
Figure 5
6, next find "CLASSPATH", no words on the "new". As shown in Figure 6
Figure 6
7, the variable is named "CLASSPATH" variable value.; %java_home%\lib\dt.jar;%java_home%\lib\tools.jar; " As shown in Figure 7
Figure 7
8, find path, edit it, before its original variable value plus ";%java_home%\bin;%java_home%\jre\bin;", the method of addition is such c: variable value. As shown in Figure 8
Figure 8
9, remember to complete the points after two to determine. As shown in Figure 9
Figure 9
10, finally, is to test their own configuration is successful, while pressing r+ WIN (the key of the Windows flag), input cmd. As shown in Figure 10
Figure 10
11, enter the command prompt, input Java, click "Enter", come out these Chinese, on the line. As shown in Figure 11
Figure 11
12, then enter Javac, click "Enter", out of these Chinese will do. As shown in Figure 12

Configure JDK environment variables under Windows XP:

1. Install the JDK, the installation process can customize the installation directory and other information, such as our choice of installation directory for d:/java/jdk1.5 .0_08

2. When the installation is complete, right-click "My Computer" and click "Properties";

3. Select the "Advanced" tab and click "Environment variable";

4. In system variables, set 3 properties, Java_home,path, CLASSPATH (regardless of the case), if already exist click "Edit", does not exist then click "New";

5.java_home indicates the JDK installation path, which is the path that was selected when the installation was just made d:/java/jdk1.5.0_ 08, this path includes folders such as LIB,BIN,JRE (this variable is best set, because later run Tomcat,eclipse and so on will need to rely on * this variable);

Path enables the system to recognize Java commands under any path, set to:

% Java_home%/bin;%java_home%/jre/bin

Classpath is the Java load class (class or Lib) path, and only the class is in Classpath, the Java command is recognized, set to:

.; %java_home%/lib/dt.jar;%java_home%/lib/tools.jar (to be added. Represents the current path)

%java_home% is the reference to the previously specified java_home;

6. Start "->;" Run, type "cmd";

7. Type the command "Java-version", "Java", "Javac" a few commands, the screen shows that the environment variable configuration success,

8. All right, finish the call. Let's start with your first Java program.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.