change default java code example
Example 1: how to change java version in linux
$ sudo update-alternatives --config java
Example 2: set default java version
# on linux
sudo update-alternatives --config java
# then just input the number of the jdk you
# want to use as default and hit Enter