Try out following command. Entry with * is the java version your system
is set to use. You can use same command to config alternate version.
update-alternatives --config java
We routinely use multiple versions of JDK on many systems. We just set
JAVA_HOME and derive all paths from that. Works perfectly.
Regards,
Niranjan
On 6/11/21 2:00 PM, Mark Thomas wrote:
On 11/06/2021 21:53, Joel Griffith wrote:
Hi everyone,
I have two Ubuntu 20.04 servers, both with Tomcat 9 and Java 8 installed
from the standard repositories.
On the first, I installed Java 8 before installing Tomcat 9. When I
installed Tomcat 9, it evidently found the existing Java 8 installation,
and when I run the server it reports that it's using Java 8
(`/usr/lib/jvm/java-8-openjdk-amd64/bin/java`).
On the second, I installed Tomcat 9 before installing Java. Thus, Tomcat
found no existing Java on the system, and it installed the additional
packages 'openjdk-11-jre-headless', 'default-jre-headless', and
'java-common' as dependencies that it did not install on the first
system.
When I run Tomcat on this one, it reports that it's using Java 11
(`/usr/lib/jvm/default-java/bin/java`, which symlinks to
`/usr/lib/jvm/java-1.11.0-openjdk-amd64/bin/java`), even though I've
since
installed Java 8 on that server, too.
Both systems use Java 8 as their default at the OS level (outside of
Tomcat):
$ java -version
openjdk version "1.8.0_292"
so I think it's a Tomcat-specific discrepancy.
I assume that there's a file Tomcat uses to record which version of
Java it
established at installation and which continues to affect how it runs
now.
Is that right, and if so, where is this file?
Nope. Nothing to do with Tomcat. You'll need to ask Ubuntu support
what is going on.
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org