I'm using a JAVA1.7 version, and if you want to get JDK you can contact me to ask.
1. Start configuring environment variables, right-click "My Computer"---"Properties"-----"advanced"---"Environment variables", as shown in figure:
2. Select New System variable--eject the new System Variable dialog box, enter "Java_home" in the Variable Name text box, enter the installation path (D:\JAVA\JDK1.8.0_40) of the JDK in the Variable value text box, and click OK, as shown in the figure:
3. View the path variable in the System Variables option area, or if it does not, create a new path, or select the variable, click Edit, and add%java_home%\bin;%java_home%\jre\bin at the start of the variable Value text box. or direct "%java_home%\bin;", click OK button, as shown in figure:
4. View the CLASSPATH variable in the System Variables option area, or if it does not, create a new variable classpath, or select the variable, click the Edit button, and add at the start of the variable value text box.; %java_home%\lib\dt.jar;%java_home%\lib\tools.jar; ". As shown in figure:
5. Test environment variables are now configured successfully or not. In the DOS Command line window, enter "Java-version" and "JAVAC", and the output Help information is configured correctly. As shown in figure: