Thursday, August 11, 2011

Java: Installation and Removal Problems

If you have deleted your Java directory in Windows, you can't uninstall it from "Add or Remove Programs" any longer. If this is the case, you won't be able to install it again or install an update because the Java Installer will think you have a previous release already installed on your computer.

There are 2 ways to remedy this.

Solution A :

If you have another Windows computer with the same Java version+update number installed on it in the same location, you can copy the directory to your other computer. Java will now uninstall and remove the "Add or Remove Programs" entry and all the other files or registry entries that are preventing you from installing it again.

The default directory structure for the JRE installation is "Program Files\Java\jre6" or "Program Files\Java\jre6.0_xx" where xx is the update number. Java 7 follows the same format with "Program Files\Java\jre7" or "Program Files\Java\jre7.0_xx".

Solution B :

Step 1 : Remove registry entries from Registry Editor.

Steps to Edit/Delete Java registry entries through Registry Editor
  1. Run the Windows Registry Editor by clicking Start->Run and entering the program name regedit in the Open edit field.
  2. Navigate to the following registry node:
    HKEY_LOCAL_MACHINE/Software/Microsoft/Windows/CurrentVersion/Uninstall
  3. Under this Uninstall node, you will find many registry entry names enclosed in curly braces. e.g. {26A24AE4-039D-4CA4-87B4-2F83216013FB}
  4. Click on each registry entries and that will display its associated data on right pane of Registry Editor.
    For example: Registry entry for Java 6 looks like this:
  5. Click Image for larger view.

  6. Delete the registry entry found for Java, by right clicking on the registry key name, and selecting Delete.
  7. Click Yes on the Confirm Key Delete message box.
Step 2 : Delete Key from InstallShield Installation folder.
  1. Go to C:\Program Files\InstallShield Installation Information folder
  2. Find Keys for Java version and delete key
    Note: This key is the same as we deleted from Windows Registry Editor
  3. After you finish above steps, restart the Add or Remove Programs Control Panel. The entry for Java should no longer appear in Add or Remove Programs.


No comments:

Post a Comment