- 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!