Toggling between Java 6 and Java 7 on mac

Raise an hand who does not have two versions of Java installed on your computer namely Java 6 as distributed by Apple and Java 7 as distributed by
Oracle. When installing Java 7, it will take over the place from Java 6 as the Java component on the system and it’s not possible to easily toggle
between the two.

This script switches between using Java 6 and Java 7 (if you’ve got these two installed).

You use it as follows:
1) Open your Terminal and type these commands to install the
command:

$ cd ~/Downloads/                                   
$ curl -s https://raw.github.com/skybert/my-little-friends/master/bash/osx/toggle-javaws-version.sh > toggle-javaws-version.sh
$ chmod +x toggle-javaws-version.sh

2) You are now ready to run it:

$ ./toggle-javaws-version.sh                       
Java web Start uses Java 6, changing it to Java 7 ...
Enter your password to change the Java version      
Password:                                           
Java web start version updated successfully :-)

You can run the script as many times as you like to toggle between the two versions of Java Web Start.

You can also use the hard way option as described here:
http://www.racoonlab.com/2013/01/how-to-re-enable-the-apple-provided-java-se-6-applet-plug-in-and-web-start-functionality/

Enjoy it!