Build a Java development environment and a Java Development Environment

Source: Internet
Author: User

Build a Java development environment and a Java Development Environment

I. preparations:

On the desktop, right-click my computer, click Properties in the dialog box, click Advanced System settings in the upper right corner of the window, and click environment variables in the lower left corner of the window to set, 1, Figure 2, figure 3.

Figure 1 Figure 2

Figure 3

Ii. Set Environment Variables

First, we need to configure three environment variables: JAVA_HOME, CLASSPATH, and Path.

1. variable name input: JAVA_HOME, variable value input: D: \ Java \ jdk1.8.0 _ 05 click OK.

Special note: The input value of the variable value is your jdk installation directory. For example, my jdk is installed in jdk 1.8.0 _ 05 under the Java folder of drive D, and my variable value is D: \ Java \ jdk1.8.0 _ 05

2. click the new button, and enter the variable name: CLASSPATH variable value input :.; % JAVA_HOME % \ lib \ dt. jar; % JAVA_HOME % \ lib \ tools. jar, and click OK.

Special note: When configuring CLASSPATH, the variable value is followed by the percentage sign. Do not forget to add a semicolon to it ,!

3. note: (1 ). if you already have the path variable, you can find the path, double-click the path, and add the following value to the end of the variable value (if not at the end of the original value; add it by yourself; ).

(2) If no path variable exists, click the new button and enter the following values. Variable name input: path variable value input: % JAVA_HOME % \ bin; % JAVA_HOME % \ jre \ bin click OK.

Iii. test whether the Java development environment is successfully set up

Enter java-version in cmd to check whether related configuration information exists. If yes, the configuration is successful!

Annotation: The Separator in the environment variable is semicolon (;).

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.