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.