Here is a step by step guide on how to Configure Java and its class path in Windows including Windows 7 and Windows 8. We have also added images on how to configure java class path, so you can easily understand :
1. Firstly goto Desktop and right click on the My omputer icon and click on 'Properties' option. It will display the basic information of your computer.
2. Now select the "Advanced System Setting" option as shown in below image.
3. After that a pop up window will appear, select "Environment Variables" on it.
4. Now goto "System" variables and select "Path" variable from it and click on edit option of it as shown in below image.
5. By default the path variable is already set to multiple locations. To set the Java directory path to the path variable, firstly give a semi colon (;) at the end and after that write your default Java >> JRE >> bin path which is like C:\Program Files\Java\jdk1.7.0_25\bin and click OK.
Now, your path variable is successfully configured along with JDK. You can check this via entering java compiler command i.e. "javac" in your command prompt.