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

$ cd ~/Downloads/                                   
$ curl -s >
$ chmod +x

2) You are now ready to run it:

$ ./                       
Java web Start uses Java 6, changing it to Java 7 ...
Enter your password to change the Java version      
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:

Enjoy it!