Running command in terminal:
sudo update-alternatives --config java
from the command line to set the version of the JRE you want to use as like available version install of java : 1.6 and 1.8
See below :
and choose 1 option and set java-6 version because already current choice set in java-8.