Keeping old and unsupported versions of Java on your system presents a serious security risk.
Uninstalling older versions of Java from your system ensures that Java applications will run with the most up-to-date security and performance improvements on your system.
The latest available version is compatible with the older versions. However, some Java applications (or applets) can indicate that they are dependent on a particular version, and may not run if you do not have that version installed. If an application or web page you access requires an older version of Java, you should report this to the provider/developer and request that they update the application to be compatible with all Java versions.
You should uninstall both versions of Java and then use the Windows Offline installer to install Java again. If you can't uninstall Java you can manually remove it.
To manually remove all traces of Java from your computer look for folders called Java and Sun and delete them. Set your Folder Options to "show hidden files and folders" and "show protected operating system files" and look for the folders that way.
For Windows XP look in:
C:\Program Files
C:\Program Files\Common Files
C:\Documents and Settings\All Users\Application Data
C:\Documents and Settings/%username%\Application Data
C:\Documents and Settings\%username%\Local Settings\Application Data
For Windows 7 look in:
C:\Program Files
C:\ProgramData
C:\Users\%username%\AppData\Local\
C:\Users\%username%\AppData\Roaming\
C:\Users\%username%\AppData\LocalLow\
Sometimes attempts to uninstall specific versions of Java through the Windows Add/Remove program, leave behind some Java entries in the registry that are not fully removed. These left behind registry entries can cause problems in installing a new version of Java.
After uninstalling Java, how do I remove its listing in the Windows?
http://www.java.com/en/download/help/regkey_addremove.xml
Did you try the Windows Offline installer or did you use the Windows Online installation when installing Java? If you did the Online installation and it didn't work try the Windows Offline installation by downloading the file from here:
Java for Windows - Offline Installation, Recommended Version 7 Update 9:
http://java.com/en/download/manual.jsp
Check to see if your version of Windows is 64-bit or 32-bit.
If you have a 64-bit version of Windows you need to download the 64-bit Offline or Manual installation file from one of these web sites:
Java SE Runtime Environment 7 Downloads:
http://www.oracle.com/technetwork/java/javase/downloads/jre7u9-downloads-1859586.html
To find out if your computer is running a 32-bit or 64-bit version of Windows in Windows 7 or Windows Vista, do the following:
1.Open System by clicking the Start button , right-clicking Computer, and then clicking Properties.
2.Under System, you can view the system type.
If your computer is running Windows XP, do the following:
1.Click Start.
2.Right-click My Computer, and then click Properties.
Verify Java Version (to see if your installation works):
http://www.java.com/en/download/installed.jsp