1. Go to Start-> Run-> cmd
2. write: java -version and hit Return. If the path variable set properly it will show your java version.
b. Setting path variable in windows 7:1. Go to start menu -> control panel -> system and security -> System.
or simply paste this in your windows explorer address bar-->
Control Panel\System and Security\System
2. Now select "Advanced system settings" from the left panel.
3. A new window appears. Click on "Environment variables..."
4. under System Variables, find PATH, and click on it.
5. If you do not have the item PATH, you may select to add a new variable and add PATH as the name and the location of the class as the value.