(Wasn\'t sure if this should go on SU... migration is certainly an option, but more programmers read questions here, so here goes).
I am running Mac OS X 10.8.4, and
I wanted to change default java version form 1.6* to 1.7*. I tried the following steps and it worked for me:
ln -s /Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home/bin/java java
java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)