Configuration and description of Java environment variables under Win7

Source: Internet
Author: User

Download the JDK (http://www.oracle.com/index.html) corresponding to the operating system on the official website

For example, my installation path is E:\jdk1.7.0_51\JDK

Right-click computer----> Properties----> Advanced system settings----> Advanced----> Environment variables

Create a new environment variable in the system variable named Java_home, with a variable value of E:\jdk1.7.0_51\JDK

Add%java_home%\bin at the front of the PATH environment variable;

Enter the Javac command under the DOS console, and if there is a message, the configuration succeeds

Description

1. The PATH environment variable is configured so that the Java development tool (. exe file) under the Bin directory can be run under any path in the DOS console, and an executable file will be looked up in the current path first, and if it does not exist, it will go to the PATH environment variable and look for it in turn.

2. The new java_home is designed to avoid frequent changes to the PATH environment variable.

3.classpath environment variable is not recommended, JDK5.0 after Java will automatically find the core class library, it is a place to store the class file, the method is set as follows:

New CLASSPATH environment variable

(1) variable named D:\: Starting the JVM will look for the. class file under the D drive path, no error is present

(2) The variable name is d:\; : Starting the JVM will first look for the. class file under the D-Drive path, no longer found under the current path

(2) the variable name is; D:\: Starting the JVM will first look for the. class file under the current path, no longer found under the D-drive path

can be interpreted as the current path

Temporary environment variable configuration:

Under DOS console, the command is as follows:

Set: View so environment variable information

Set environment variable name: View specified environment variable information

Set environment variable name =: Empties the specified environment variable information

Set environment variable name = Path: Modifies the specified environment variable information

Set environment variable name = new Path;% original environment variable%: You can add a new environment variable on a specified environment variable

Configuration and description of Java environment variables under Win7

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.