java - How to change Tomcats JVM version? -


i have java jdk 1.7.0_21 installed on debian machine (along others). have configured debain use jdk:

pi@raspberrypi ~ $ java -version java version "1.7.0_21" java(tm) se runtime environment (build 1.7.0_21-b11) java hotspot(tm) client vm (build 23.21-b01, mixed mode) 

from reading notes in tomcat catalina.sh, understand tomcat server should use java_home/jre_home system variables

#   java_home       must point @ java development kit installation. #                   required run "debug" argument. # #   jre_home        must point @ java development kit installation. #                   defaults java_home if empty. 

i have set proper directory. echoing variables gives following output:

pi@raspberrypi ~ $ echo $java_home /opt/oracle_java/jdk1.7.0_21/bin pi@raspberrypi ~ $ echo $jre_home /opt/oracle_java/jdk1.7.0_21/jre 

the tomcat web application manager still shows 1.6.0_27-b27 jvm in use.

do have advice on how make tomcat run 1.7.0_21 jdk?

navigate directory tomcat installed, , go \bin folder (/tomcat/bin). right-click file catalina.bat, , select edit

scroll down in code until pass end of beginning “rem” comments, , insert following code pointing jdk’s root directory:

     set java_home=/opt/oracle_java/jdk1.7.0_21 

save changes, , restart tomcat.


Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -