I've got a similar problem I'm currently working on solving. I can't say this will solve your error since there may be issues with other software (which is my case with Eclipse Luna).
Java is using the path given in your PATH variable, which is,
C:ProgramDataOracleJavajavapath
Go to this folder (ProgramData is hidden, so unhide it if necessary) and right click on the java.exe symlink. You'll see in the Target field where it's looking for java.exe. It may be pointing to the java.exe file from your previous jdk1.6.0_45 install. Either paste in new shortcuts here or change the PATH setting as others have mentioned.
I've found that the Java installer doesn't change the javapath or update the system path, at least when going from 1.8 to 1.7. In my case changing the shortcuts only led to a problem with Eclipse on startup.
EDIT:-----
After playing with javapath folder shortcuts it turns out you need symlinks, at least for Eclipse. See, Windows how to create directory symlink.
You don't need the /d switch for a file symlink,
mklink java.exe "C:Program FilesJavajdk1.8.0_20injava.exe"
mklink javaw.exe "C:Program FilesJavajdk1.8.0_20injavaw.exe"
mklink javaws.exe "C:Program FilesJavajdk1.8.0_20injavaws.exe"
This now works for me.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…