set java version to openjdk 8 code example
Example 1: install openjdk 8 sdk on ubuntu
sudo apt-get install openjdk-8-jdk
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