upgrade ubuntu16.04 to ubuntu20.04, manual installation of tomcat8 comes with java11, how to change this to java8
Solution 1:
You can install The OpenJDK 8 package from the standard repositories:
sudo apt install openjdk-8-jdk
From there you can check the version, which should look something like this:
java -version
openjdk version "1.8.0_302"
OpenJDK Runtime Environment (build 1.8.0_302-8u302-b08-0ubuntu2-b08)
OpenJDK 64-Bit Server VM (build 25.302-b08, mixed mode)
From there you can follow this answer to install Tomcat 8.5.30 👍🏻