I'm posting this here because I see a lot of people with the same problem I had when upgrading to Mavericks.
At first I couldn't get it back to 1.6.
I tried reinstalling it, didn't work.
And looking all over the internet I couldn't find anything on removing 1.8, only the 1.7.
How I got it to work was by actually deleting the java 1.8 file using the method described at the bottom of this page http://docs.oracle.com/javase/7/docs/webnotes/install/mac/mac-jdk.html.
I know it's for 1.7 but if you use the same commands just replace the 1.7 file name with your 1.8 file name it works just fine.