Specify Default JDK on Ubuntu
sudo update-alternatives --config java
will produce:
Selection Path Priority Status
0 /usr/lib/jvm/java-7-openjdk-i386/jre/bin/java 1071 auto mode
*1 /usr/lib/jvm/java-6-openjdk-i386/jre/bin/java 1061 manual mode
2 /usr/lib/jvm/java-7-openjdk-i386/jre/bin/java 1071 manual mode
The you can select a number to specify the default JDK;
use sudo update-alternatives --config javac
config javac version.