FreeKB - JAVA_HOME on Tomcat on Linux
JAVA_HOME on Tomcat on Linux

Home > Search


This assume you have some flavor of Java installed on your Tomcat server. If your $CATALINA_HOME or $CATALINA_BASE directories do not contain a file named setenv.sh, create the file. In the setenv.sh file, define JAVA_HOME, like this.

export JAVA_HOME=/opt/java/jdk1.8.0_05

 

Or using Oracle Java.

export JAVA_HOME=/opt/oracle/jdk

 

Or using Adopt OpenJDK.

export JAVA_HOME=/opt/adoptopenjdk/jdk8

 

Restart the Tomcat JVM for this change to take effect.

The ps command can be used to ensure that the JVM is using the appropriate version of Java.

ps -ef | grep your_jvm

root3448 1 0 Oct27 ? 00:30:47 /opt/oracle/jdk/bin/java

 



Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.




Please enter 0649f in the box below so that we can be sure you are a human.




Comments