try this;
in CMD do: java -version
if it can't get a java version do the below.
1. Right click Computer
2. Click properties
3. Click "Advanced system settings"
4. Click "Environment Variables"
5. Under system variables, find the Path variable
6. Click edit, and append to the end of the value: ";C:Program Files (x86)Javajre6in"
7. Now re-open the command prompt and try again.