One thing I can't seem to fix is Java. Upgrading or uninstalling produces the following error:

I've attempted to remove it manually and by using JavaRA, but it's still showing in add/remove programs and still not functional in any way. I've also tried installing the 64-bit version but I think the broken one is interfering with that in some way.
Any ideas? The program files folders for java are totally gone, and most of the reg entries are too, but they still show in add/remove programs.