
Symptom
As an example, you have accidentally updated your Java version from 1.4.2 to 1.6.0_37. Due to this, some of your applications become unusable because of Java version incompatibility.
Solution
1. For my case, i have downloaded back the old version of Java from the Oracle website (or you can google the Java version and it will prompt you the download site).
2. Once downloaded and installed, right click on My Computer > Properties. Go to Advanced > Environment Variables. Under System Variables and enter the information as below screenshot.
Variable name: CLASSPATH Variable value: PATH-DIRECTORY-TO-JAVA

3. Next, look for Variable name, Path or if not existed, just create a new Variable name as Path. Add the information as below screenshot.
Variable name: Path Variable value: %CLASSPATH% (add ; if there are multiple values)

4. Now, you can check the Java version from command prompt.
java -version

