0

As Ubuntu20.04 doesn't have tomcat8 in default pkg, I am trying to install it manually using these commands:

sudo wget -c http://launchpadlibrarian.net/366407131/tomcat8_8.5.30-1ubuntu1_all.deb http://launchpadlibrarian.net/366407127/tomcat8-common_8.5.30-1ubuntu1_all.deb http://launchpadlibrarian.net/366407125/libtomcat8-java_8.5.30-1ubuntu1_all.deb
sudo apt install -y ./libtomcat8-java_8.5.30-1ubuntu1_all.deb ./tomcat8_8.5.30-1ubuntu1_all.deb ./tomcat8-common_8.5.30-1ubuntu1_all.deb

But this version installs java11 by default, is there any way to change this default java version to java8

matigo
  • 24,752
  • 7
  • 50
  • 79

1 Answers1

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

matigo
  • 24,752
  • 7
  • 50
  • 79