An automated option is to use the script described here:
http://www.racoonlab.com/2013/08/toggle-between-java-6-and-java-7-on-mac/
How to re-enable the Apple-provided Java SE 6 applet plug-in and switch java version.
Have you installed the latest java and javaws doesn’t start?
If you have already followed the steps below once, you can perform directly points 4 and 5 this time.
After following the below steps you can switch java by declaring
for java 6
export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home
for java 7
export JAVA_HOME=$(/usr/libexec/java_home) export PATH=${JAVA_HOME}/bin:$PATH
How to change the plugin:
If, after installing Java for OS X 2012-006 and Java 7, you want to disable Java 7 and re-enable the Apple-provided Java SE 6 plug-in, follow these steps.
Note: You must be logged in as an administrator.
Note: If prompted for your administrator password after a command, enter it and then press the Return or Enter key.
- Open Terminal, located in the Utilities folder.
- Enter this command, then press the Return or Enter key:
sudo mkdir -p /Library/Internet\ Plug-Ins/disabled
- Enter this command, then press the Return or Enter key:
sudo mv /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/ /Library/Internet\ Plug-Ins/disabled/
- Enter this command, then press the Return or Enter key:
sudo ln -sf /System/Library/Java/Support/Deploy.bundle/Contents/Resources/JavaPlugin2_NPAPI.plugin /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin
- To re-enable Java SE 6 Web Start, enter this command, then press the Return or Enter key:
sudo ln -sf /System/Library/Frameworks/JavaVM.framework/Commands/javaws /usr/bin/javaws
Additional Information
The following steps will undo the above commands and restore Java 7.
To disable Java SE 6 Web Start opening
Enter this command, then press the Return or Enter key:
sudo ln -sf /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/javaws /usr/bin
| Toggle between Java 6 and Java 7
Aug 26, 2013 -
[…] How to switch from Java6 to Java 7 and back to Java 6 on MAC Java web service does not start, bad installation, no jre found […]