Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Set java version to two different Tomcat instances

Tags:

java

tomcat

I've two Tomcat instances A and B on my working machine and I need to set two different java versions for each instance; on A java 1.6 and on B java 1.7, how can I make it?

like image 911
andPat Avatar asked Oct 25 '13 11:10

andPat


2 Answers

change JAVA_HOME to the explicit path of your java installation in tomcat\bin\catalina.bat for windows or tomcat\bin\catalina.sh for linux

for java7 the path could be C:\Program Files\Java\jre7

like image 160
Philipp Sander Avatar answered Nov 19 '22 11:11

Philipp Sander


In catalina.bat file, set JAVA_HOME for both instances of tomcat. say for instance A, set it to path of java 1.6 and for instance B , set it as java 1.7.

set JAVA_HOME=C:\Program Files\Java\jdk1.6.0_07

add this line in the bat file, change path accordingly.

like image 39
codingenious Avatar answered Nov 19 '22 11:11

codingenious