If you tried Installing JRE6 or JRE7 dmg on your Mac OSX 10.10 Yosemite you would face the following error message.
Java from Oracle requires Mac OSX 10.7.3 or later.
Your system has Mac OS X Version 10.10. This product can be installed on Version 10.7.3 or later.
Visit java.com/help for more information.
This seems to be a bug with the package installer, oracle has fixed the bug with 8u20_b017 version link : https://jdk7.java.net/download.html