Configuration of JDK (Java SE) environment variables in win7 (revised version)

Source: Internet
Author: User
  1. Download JDK.

: Http://www.oracle.com


 

As shown in, move the mouse overDownloads, Point Popular
Java for developers under downloads go to the JDK download page!

SelectJava platform
(JDK) version Download: download the required version as prompted! The download process is omitted!

2. Install

Install JDK (Java Development Kit ). Installation Process omitted ......

Note:

To modify the installation directory or installation path, such:

D:/ProgramFiles/Java/jdk1.6.0_24

The installation path must not contain "spaces "!

Q &:

Why is it set to this form? The reason is that some other software may be used in the future, so we set it to this form at the beginning.

3. Configure environment variables.
Win7JDK (Java
Se) environment variable configuration. (Take my installation as an example !)

I. Computer --- Right-click --- properties.

Ii. Click --- advanced system settings --- advanced.


Iii. Click --- environment variable.


 

Iv. Set it in "User variables" (of course you can also set it in system variables )!

Note:

The user variable is only valid for the current user (does not affect other users ).

System variables are valid for all users (multiple users may have an impact ).


①. New ---> variable name: java_home

Variable value: D:/ProgramFiles/Java/jdk1.6.0 _ 24


(This is my installation path. here you need to add your installation path)


②. Edit --> variable name: Path

Variable value:

%JAVA_HOME%/bin;%JAVA_HOME%/jre/bin

Note: you only need to add it before the original PATH variable value. Remember to use a semicolon (;). Otherwise, problems may occur in other installed software.

③. New --> variable name: classpath

Variable value:

.;%JAVA_HOME%/lib;%JAVA_HOME%/lib /dt.jar;%JAVA_HOME%/lib/tools.jar


④ The configuration is complete.

4. test whether the environment variable is configured successfully.

For Windows key + R, type cmd, and then Java, javac, and Java.
-Version

① Type Java and press Enter.





② Type javac and press Enter.




③ Type:

java -version





  
As shown in, environment variables are successfully configured.


Good luck!





 

 

 

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.