ubuntu how to use java 8 instead of 11 code example Example: java 8 install ubuntu sudo apt-get install openjdk-8-jdk