When you open catalina.sh / catalina.bat, you can see :

Environment Variable Prequisites

JAVA_HOME Must point at your Java Development Kit installation.

So, set your environment variable JAVA_HOME to point to Java 6. Also make sure JRE_HOME is pointing to the same target, if it is set.

Update: since you are on Windows, see here for how to manage your environment variables

Answer from Bozho on Stack Overflow
🌐
CodeJava
codejava.net › servers › tomcat › 4-ways-to-change-jre-for-tomcat
4 Ways to Change JRE for Tomcat
August 5, 2019 - In this article, we summarize different ways to change JRE for a Tomcat installation.To know which JRE version is used for Tomcat, go to the following URL: localhost:8080/manager/statusAnd look at the JVM Version column: This way is very simple to implement but it works only for Tomcat installed from a zip distribution (in contrast to Tomcat installed as a service). If only the JAVA...
🌐
Apache
tomcat.apache.org › whichversion.html
Apache Tomcat® - Which Version Do I Want?
Apache Tomcat 9.x builds on Tomcat 8.0.x and 8.5.x and implements the Servlet 4.0, JSP 2.3, EL 3.0, WebSocket 1.1 and JASPIC 1.1 specifications (the versions required by Java EE 8 platform).
🌐
Mkyong
mkyong.com › home › tomcat › how to change tomcat to use jdk 7
How to change Tomcat to use JDK 7 - Mkyong.com
December 30, 2015 - The current environment is using Tomcat 7 + JDK 6. How to configure Tomcat to use JDK 7? ... #... # The home directory of the Java development kit (JDK). You need at least # JDK version 1.5. If JAVA_HOME is not set, some common directories for # OpenJDK, the Sun JDK, and various J2SE 1.5 versions ...
Find elsewhere
🌐
Atlassian
blog.developer.atlassian.com › home
Tip of the week: Configure your Java version in Tomcat
March 30, 2015 - In a previous post, Designing a Forge app, I outlined my approach to defining the architecture of a Forge app · Stay up to date on the latest developer news & trends
🌐
Coderanch
coderanch.com › t › 743772 › application-servers › java-version-web-app
Different java version for each web app (Tomcat forum at Coderanch)
June 29, 2021 - Seems like you're asking how to configure the listening port for an instance of Tomcat. Here's one of the tutorials I found online which tell you that: Modify the default Apache Tomcat port. And you also want to know how to specify the Java version it uses? 4 Ways to Change JRE for Tomcat.
🌐
Coderanch
coderanch.com › t › 110843 › os › update-Tomcat-JVM-Linux
How to update Tomcat's JVM in Linux? (GNU/Linux forum at Coderanch)
The distro is RedHat 9. The problem getting the browser part of the server updated was that the JAVA_HOME was being set both in the /etc/bashrc and also in the starttomcat shell sript (oops!). Thus, when tomcat loaded it referred to the old JVM. Changing this variable to /usr/java1.5.0_08 fixed the problem.
🌐
GitHub
github.com › bitnami › vms › issues › 1118
Tomcat 8.5.92 using by default Java 17 instead of Java 8 · Issue #1118 · bitnami/vms
August 27, 2023 - Tomcat 8.5 isn't even valid for java 17 it seems The following link explain how to change java version but it didn't work since it is for newer versions of tomcat but not for tomcat 8: https://docs.bitnami.com/aws/infrastructure/tomcat/administration/use-independent-java-tomcat/
Author   bitnami
🌐
JetBrains
jetbrains.com › guide › java › tutorials › migrating-javax-jakarta › update-tomcat-version
Updating Tomcat version - JetBrains Guide
November 12, 2024 - FROM tomcat:10-jdk17 ADD target/MyWebApp.war /usr/local/tomcat/webapps/MyWebApp.war EXPOSE 8080 CMD ["catalina.sh", "run"] Before we start the migration from javax to jakarta let's run our project to see the error we need to fix. You can run your project with ⌃R (macOS) / Shift+F10 (Windows/Linux).
🌐
Mrc-productivity
mrc-productivity.com › docs › knowledge-base › upgrading-to-tomcat-10-and-jdk-17
Upgrading to Tomcat 10 and JDK 17 – m-Power Documentation
April 7, 2026 - Run the following command java -jar jakartaee-migration-1.0.8-shaded.jar "C:\Program Files\mrc\development\m-power\mrcjava\WEB-INF\classes" "C:\Program Files\mrc\development\m-power\mrcjava\WEB-INF\classes-out" Rename the \m-power\mrcjava\WEB-INF\classes folder to classes_tc9. Rename the \m-power\mrcjava\WEB-INF\classes-out folder to classes. Restart development Tomcat.
🌐
Coderanch
coderanch.com › t › 87891 › application-servers › Change-Tomcat-JDK-Version
Change Tomcat's JDK Version (Tomcat forum at Coderanch)
I use Tomcat 5.5.9 , and the JVM ... or catalina.property file, they seem not the right one. help please Regards ... Go to tomcat/bin and modify the JAVA_HOME parmater in catalina.sh (for linux/unix) or catalina.bat (for windows)...
🌐
Atlassian
atlassian.com › home › tip of the week: configure your java version in tomcat
Tip of the week: Configure your Java version in Tomcat - Work Life by Atlassian
May 21, 2024 - This works great for 90% of installs, but power users will need to get into this file for a variety of reasons, such as configuring Tomcat’s memory utilization or GC implementation. This file can typically be found at {app_install}/bin/setenv.sh or {app_install}binsetenv.bat in Windows. ... To configure the JAVA_HOME in *nix, open setenv.sh file in your favorite text editor and add the following as a new first line: ... Once complete, save the change to the file and start (or restart) the server!
🌐
DZone
dzone.com › coding › java › how to set up jdk and tomcat on ubuntu
How to Set Up JDK and Tomcat on Ubuntu
December 29, 2017 - Step 1: Download the latest JDK and Tomcat (in this article, I am using JDK 9 and Tomcat 9). Step 2: Change the permissions and ownership of the "opt" directory.
🌐
Coderanch
coderanch.com › t › 735119 › application-servers › Changing-Tomcat-Service-JDK
Changing Tomcat Service JDK (Tomcat forum at Coderanch)
Hi...for future reference, I copied Tomcat9w.exe and renamed the copy Tomcat99w.exe, to match the service name, and I was able to change the JVM. The service exe file name has to match the Windows service name. Thank you. ... Boost this thread! ... Cant deploy through manager on tomcat 7.0.55 through iis 8.5 with ajp connector setup. 404 · String class can't find split method: wrong java version?