How to change Java version used by TOMCAT?
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
You can change the JDK or JRE location using the following steps:
- open the terminal or cmd.
- go to the
[tomcat-home]\bin
directory.
ex:c:\tomcat8\bin
- write the following
command:
Tomcat8W //ES//Tomcat8
- will open dialog, select the java tab(top pane).
- change the Java virtual Machine value.
- click OK.
note:
in Apache TomEE same steps, but step (3) the command must be: TomEE //ES