win7/Win8next JDK environment variable setting method
First need to official Web download JDK This software, I downloaded the jdk-7u40-windows-i586 version, installation completed display jdk1.7.0_67.
Next, select the installation path. My installation path is D:\Program files\java\jdk1.7.0_67.
After the installation is complete, you need to set environment variables to make the compiler work. Right-click Computer, select Properties, select Advanced System settings on the left, select Advanced tab, and click the Environment Variables button in the lower right corner.
The following popup dialog box will appear with user variables and system variables. The user variable is valid for the current login account, the system variable is valid for all users, and the reader can set it as needed.
Method/Step
1. Click New in the system variable or user variable (WIN8 user recommended choice), the variable name fills in the Java_home, the variable value fills in the JDK installation path, fills in here "D:\Program files\java\jdk1.7.0_67".
2. In the system variable, click the new variable name to fill in the Classpath, the variable value is filled ".; %java_home%\lib;%java_home%\lib\tools.jar ". Be careful not to forget the front dot and the middle semicolon.
3. Locate the path variable in the system variable, which is the system's own, not new. Double-click Path, because the original variable value already exists, it should add ";%java_home%\bin;%java_home%\jre\bin" after the existing variable. Note the preceding semicolon.
4. At this point, the appropriate environment variables have been configured. Verification method: Enter the cmd command in the Run box, enter Java after carriage return, press ENTER to display the following screen
5. Enter Javac, press ENTER to display the following screen, the setting is successful.
Java Environment settings