1- Open System properties (Control Panel==>System)
2- Go to the "Advanced tab"
3- Click on the "Environment vars" button
4- In the "System vars" table, make sure you have "CLASSPATH" variable with the value set to the folder containing java JDK