It seems like I just posted this same article about mavericks? Anyways, apparently the current JAVA installer for the MacOS thinks Yosemite 10.10 is actually 10.(one). It prompts you to upgrade to an OS above 10.7.5+ when you try to install it on the developers previews. Half of the tools I use everyday for development require JAVA on my machine to be running and working in some way, shape or form. Anyways, there is an patched version here that will work. (Note- This is a pre-release of the next JAVA version. But it works just fine.) I always install both JRE and JDK. You really dont need JDK if your not a developer.
Download it here: https://jdk8.java.net/download.html
If you installed the JDK, crack open your terminal and type java -version when you are done to see that it worked. If you just installed the JRE, open your system preferences and click the JAVA control panel so see if it updated. Currently this release is at version 8 release 20.
reference: http://wallydavid.com/how-to-get-java-installed-in-10-10-yosemite-developers-preview-2
Download it here: https://jdk8.java.net/download.html
If you installed the JDK, crack open your terminal and type java -version when you are done to see that it worked. If you just installed the JRE, open your system preferences and click the JAVA control panel so see if it updated. Currently this release is at version 8 release 20.
reference: http://wallydavid.com/how-to-get-java-installed-in-10-10-yosemite-developers-preview-2