Hoang ND

web developer

Install Java 6 in Yosemite

1. You need to remove JDK first

Navigate to /Library/Java/JavaVirtualMachines and remove the directory whose name matches the following format:*


For example, to uninstall 7u6:

rm -rf jdk1.7.0_06.jdk

2. Remove Java Applet Plugin

sudo rm -fr /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin

3. Re-enable the Apple-provided Java SE 6 web plug-in and Web Start features

Do not attempt to uninstall Java by removing the Java tools from /usr/bin. This directory is part of the system software and any changes will be reset by Apple the next time you perform an update of the OS.

sudo mkdir -p /Library/Internet\ Plug-Ins/disabled 
sudo mv /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin /Library/Internet\ Plug-Ins/disabled
sudo ln -sf /System/Library/Java/Support/Deploy.bundle/Contents/Resources/JavaPlugin2_NPAPI.plugin /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin 
sudo ln -sf /System/Library/Frameworks/JavaVM.framework/Commands/javaws /usr/bin/javaws

4. Install Apple provided Java 6

Download it here and install it: