1. Install JDK
Double-click to open just download the JDK installation package, the installation directory can be arbitrary, as long as you remember, of course, C is better, but by Yu Xiao is a programmer, installed more development related software and environment, so installed in D disk
2.JAVA environment variable Configuration
After you install the JDK, find my computer, press the right button, click the attribute option, press the Advanced tab, click the environment variable
Win7 or Vista for: Computer-Properties-Advanced system Settings-advanced-environment variables
Next, you will see this interface:
Below, we found three environment variables in the system variables, namely: classpath,path,java_home (if not please press new) if the corresponding variable before the other variables, please hit ";", if it exists, click Edit, open the following image editing interface:
Next, edit or create the following environment variables:
CLASSPATH:%java_home%lib;
JAVA_HOME:JDK Installation Path jdk1.6.0_18
PATH:%java_home%bin;
Click OK to exit the editing interface, then click OK, exit environment variable interface
3. Validating JDK and environment variables
Then hold down the win key on the keyboard (Windows pattern button) +r, open the run, type cmd
Next, see the black Background White Word command line interface, and then type: java–version (note that there is a space)
If you see the following to indicate that your JDK and environment variables have been configured successfully, start from the third step: