Java Learning Note 1--WINDOW7 JDK environment variable configuration diagram

Source: Internet
Author: User

1. Download the Java Installation Kit first

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

Click Accept License Agreement and download it according to your operating system. downloaded and installed under the C:\Program Files (x86) directory.

2, Win7 System right-click on the computer to open properties → advanced system settings → TAP environment variables

3. Configure Environment variables

  In "System Variables", set 3 properties, Java_home, Path, ClassPath (case does not matter), if already exist then click "Edit", do not exist then click "New".

①java_home indicates the JDK installation path, which is the path selected at the time of installation, click New, Pop Up a dialog box, variable name input java_home, variable value input C:\Program Files (x86) \java\jdk1.8.0_ 40, this path includes folders such as LIB,BIN,JRE (this variable is best set, because this variable is required to run Tomcat,eclipse later).

②path specifies a list of paths for searching the executable file, allows the system to identify the JAVA command under any path , because path already exists in the system variable, so we click Edit, add%java_home%\bin;%java_home%\jre\bin to the front ; Remember that there must be a semicolon (;) in the end.

③classpath is the Java Load Class (Classorlib) path, only the class is in Classpath, the Java command is recognized, set to:.; %java_home%\bin;%java_home%\lib\dt.jar;%java_home%\lib\tools.jar(the first to have. It represents the current path) in fact,%java_home% is referring to the previously specified Java _home;

4. Test configuration is successful

  Start typing cmd, type the command "Java-version", "Java", "Javac" a few commands, the screen shows that the environment variable configuration is successful.

If ' Javac ' is not an internal or external command, it is not a running program or batch file. This explains the Java environment variable configuration error, carefully check it!

Java Learning Note 1--WINDOW7 JDK environment variable configuration diagram

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.