Is there a way to tell Tomcat 7 the path to the JVM that must be used? For example:
startup --jvm /path/to/my/jvm
Apache Tomcat requires 64-bit Java/OpenJDK. If you have multiple Java versions installed on your system, we recommend that you uninstall older Java versions and keep only the latest supported Java version.
We can change the JRE for Tomcat by setting the JRE_HOME variable in a script file called setenv. bat (on Windows) or setenv.sh (on *nix). This file does not exist by default, so create such file and place it under CATALINA_BASE\bin directory (CATALINA_BASE is the Tomcat installation directory).
Building Apache Tomcat requires a Java 6 JDK to be installed and optionally a Java 7 JDK installed in parallel with Java 6 one. The Java 7 JDK is only required if you wish to build Tomcat with JSR-356 (Java WebSocket 1.1) support.
Tomcat has Eclipse Java Compiler bundle so it can run on JRE and still support JSP.
A more flexible approach is to create a file named setenv.bat
/ setenv.sh
(pick the right one for your platform) in $CATALINA_BASE/bin
and set JAVA_HOME
there. That way it only affects Tomcat, not anything else you are running. It also makes it easy to run multiple different Tomcat installations on different JVMs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With