Here is how I have dealt with this (installing the correct Java version).
First, you need to have a 64-bit operating system. I’ll assume you do.
Go into Add/Remove programs and uninstall all instances of java there.
Then, go to this page to download the 64-bit version, and install that.