If you would like to learn Java programming, the best way is by writing Java codes by yourself. To compile the Java codes then you need Java Development Kit (JDK). It can be Oracle JDK or OpenJDK. This post guides you how to install Oracle JDK 8 on Mac OS X 10.10 Yosemite. It should be also applicable for previous version of OS X such as OS X Maverick, Mountain Lion, and OS X Lion. At the time of this post written, the latest version of JDK is JDK 8 Update 25.
Basically I previously had written an article how to install Java SE 7 / JDK 7 on Mac OS X Lion. I just would like to rewrite on the newest version.
I just encountered this in another Eclipse-based app on Yosemite and figured out (with help from the references below) how to get the app running without installing the legacy Java SE 6 JRE. Here are the steps in case it helps other devs get Eclipse working. I need to test a web application with JRE 6. I am using a Mac with OS X 10.10 and Java 7 for development. How can I install JRE 6 next to Java 7 on this Mac? This previous answer does not yet account for the fact (also mentioned in a comment) that Apple's download link by now points to a.pkg (Java for OS X 2014-001) file.Without further knowledge I hasten to install it, for it may overwrite. When I open the launcher, pop-up says 'To open “Minecraft” you need to install the legacy Java SE 6 runtime.' Java 8u20 Build b17 is the only version of java that works on Mac OS X 10.10 Yosemite.
Found that Adobe Photoshop CS5 won't run in Mac OS X Yosemite? Is it demanding that you 'install the legacy Java SE 6 runtime'? Here's how to fix the problem and get Photoshop CS5 to work in OS X.
1. Download Oracle JDK 8 from Oracle website. You need to accept license agreement to be able to download the file. Make sure you select the Mac OS X x64 platform (jdk-8u25-macosx-x64.dmg).
2. Double-click the downloaded file ‘jdk-8u25-macosx-x64.dmg’ and follow the on-screen installation.
3. Once it is successfully installed, it is installed inside /Library/Java/JavaVirtualMachines folder.
Java Se 6 For Mac

4. Verify that the system is now using JDK 8.


5. If you would like to uninstall JDK 8, simply remove the jdk1.8.0_25.jdk
Java 6 For Mac Download
Hopefully this tutorial helps you on installing JDK 8 / Java SE 8 on Mac OS X 10.10 Yosemite.
