Wanted to install latest version of Java. When tried to install Java, got failed because of the existence of previous version of Java. There was no uninstaller available to uninstall the previous version of Java. To make successful installation of Java there was a need to remove previous version of Java from program list.
Below listed steps were followed to clear Java from control panel.
Search for the program name (eg; Java)
Look for the folder that contains the program and delete it.
Once you refresh and try reinstalling it should be success.