Score:0

upgrade ubuntu16.04 to ubuntu20.04, manual installation of tomcat8 comes with java11, how to change this to java8

ck flag

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

Score:1
in flag

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

Java_Arc avatar
ck flag
I could see these errors after installing tomcat8 from apt 24-Nov-2021 21:46:21.951 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 95238 ms 24-Nov-2021 21:46:22.107 SEVERE [http-nio-8080-exec-4] org.apache.coyote.AbstractProtocol$ConnectionHandler.process Error reading request, ignored java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer;
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.