One problem may be due to multiple java run time environments. open cmd.exe and give command java. It shows if there is a mismatch in version setting. Then run regedit.exe and goto HKEY_LOCAL_MACHINE->SOFTWARE->JAVASOFT->JAVA_Run_Time_ENvt
There change CurrentVersion to correct version.
However this may not be the reason. There may be a missing value in path setting. check in properties of mycomputer-> advaced->environment vars-> System vars->path.