Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to configure Tomcat to use Java 7

Tags:

I have a web application in java 6 byte code and would like to test it in a Java 7 JVM environmment. For that purpose, I would like to configure Tomcat (for running the web application) to use Java 7. Now my question is how to do this?

Do I just set my JAVA_HOME environment variable to the path where Java 7 is installed, so that tomcat is run in the right JVM (Version 7)? Or is there another way to do this?

like image 670
Horace Avatar asked Jun 12 '12 16:06

Horace


2 Answers

If you're using Windows, this helps. Run Tomcat helper app (tomcatw.exe) and simply configure Java Virtual Machine DLL path under Java tab. Use default must be unchecked.

enter image description here

like image 182
Sami Lehtinen Avatar answered Oct 21 '22 05:10

Sami Lehtinen


You answered your own question.! :) All You need to do is link java 7 in your JAVA_HOME.!

More Info Here

Edit : (Based on alfabravo's comment :

You can definitely change the pointer to JAVA_HOME in your catalina.bat/sh

like image 45
Anuj Patel Avatar answered Oct 21 '22 04:10

Anuj Patel