Use update-alternatives command to set default Java version as following command:

According to the above screenshot, I have selection option 2 which will set Oracle Java 8 as default Java version on your system. You can use java -version command to view default version.

How to Switch Between Multiple Java Versions on Debian   TecAdmin - 19