Change the local installed Java version

To display the currently used version of Java you can execute in your shell:

java -version

Additionally, also the installed versions can be checked by:

sudo update-alternatives --config java

Within the former dialog, you can change the default Java version that is used by the system.