Java (2) -- Build and install JDK in the development environment and configure environment variables and jdk Environment Variables

Source: Internet
Author: User

Java (2) -- Build and install JDK in the development environment and configure environment variables and jdk Environment Variables

1. Install JDK

Http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

The downloaded jdkis the executable file with the extension name ".exe". Just like installing the common application software, click and follow the prompts to install it. After the installation is complete, the files in the installation directory

 

2. Configure Environment Variables

JAVA_HOME configure the JDK installation path (my installation path is D: \ Java \ jdk1.8.0 _ 45)

Position of the JDK command file configured by PACH (bin directory)

CLASSPACH configuration class library file location (lib directory)

The JAVA_HOME and CLASSPACH environment variables are not available by default. You need to create these two variables by yourself.

 

Step: Right-click the computer and choose Properties = advanced system settings = Advanced> environment variable =.

1. Right-click the computer and choose Properties.

  

2. Click Advanced System settings

  

3. Go to system property settings, click the "advanced" tab, and then click the environment variable button in the lower right corner.

  

4. Go to environment variable settings to create and edit environment variables.

  

Create and set the JAVA_HOME variable. The variable value is the JDK installation path, that is, the JDK installation location on the disk (I installed it on D: \ Java \ jdk1.8.0 _ 45 ), click OK after setting.

  

Similarly, create and set the CLASSPACH variable. The variable value is the location of the class library file, that is, the path of the lib directory (my path is D: \ Java \ jdk1.8.0 _ 45 \ lib). Click OK.

  

For the PACH variable, the system already exists. You only need to edit it and configure the JDK command file location (bin directory path) to the environment variable.

  

Go to edit environment variables and click OK.

So far, environment variable configuration is successful.

Check whether the environment is configured successfully.

Click Start Menu = Enter cmd and press Enter.

  

Enter the doscommand line mode and enter java press ENTER

  

The following message is displayed, indicating that the configuration is successful.

  

Related Article

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.