How to set the java version to use as default in Linux

Open a Terminal window
Enter the following command

sudo update-alternatives --config java

Follow the onscreen prompt