1. Download the JDK website
Http://www.oracle.com/technetwork/java/javase/downloads/index.html Self-selected version of Win x86 is 32-bit win x64 is 64-bit
It is recommended that you do not select the latest version kit7 OK.
Custom installation after download (Win8 If there is a permissions issue, select the install package right-click Run as Administrator)
It is recommended that the installation directory be C:\java or D:\java like this to avoid WIN8 administrator permissions issues.
Installation is divided into two steps first install the JDK, complete immediately after the second step of the JRE installation, it is recommended to put in the same directory is similar to the installation path
2. Configure Environment variables
My Computer (right-click), properties, advanced system settings, environment variables
In the following system variable, look for the path path, edit to add all bin directories under the Java installation directory to the end of the path value (do not delete the existing variable values here, if you accidentally delete, do not save, cancel and open) and have English; number separated, a total of three bin directory
If you are installing by default path:
C:\Java\jdk1.7.0_67\bin
C:\Java\jdk1.7.0_67\jre\bin
C: \java\jre7\bin
Next, under System variables, create a new
The name CLASSPATH or (CLASSPATH) is not actually case-sensitive.
Then write the English dot (. means the current path) and then add all the Lib directories in the installation directory to the value of the variable in English; a three lib directory is separated by the following example:
C:\Java\jdk1.7.0_67\lib
C:\Java\jdk1.7.0_67\jre\lib
C:\ProgramFiles\Java\jre7\lib
The complete variable value of the last classpath should resemble the following
(Note the English point number).; C:\Java\jdk1.7.0_67\lib; C:\Java\jdk1.7.0_67\jre\lib; C:\Java\jre7\lib
3. Test your installed
Start menu, run->cmd
Then enter Java, Javac, Java–version, javac–version four commands if you have feedback, it's a success.
Finally note if more than one version is installed on your computer, make sure that the Java and Javac version versions are consistent
JAVA Environment Building