Had a little headache trying to change version of JDK back from 1.7 to 1.6, so here is the instruction:
sudo add-apt-repository ppa:nilarimogard/webupd8 sudo apt-get update sudo apt-get install update-java
Then type:
sudo update-java
… and you’ll see the window with versions of Java to switch to.
Voila.
P.S. To extend the list of available JDK’s download the version you need and extract it to /usr/lib/jvm/