Bootstrap FreeKB - Tomcat - JAVA_HOME variable
Tomcat - JAVA_HOME variable

Updated:   |  Tomcat articles

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

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


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