Bootstrap FreeKB - Tomcat - Classpath (setenv.sh)
Tomcat - Classpath (setenv.sh)

Updated:   |  Tomcat articles

Let's say you want to add a JAR file to a Tomcat application servers classpath. This can be done by creating or editting the setenv.sh file at <tomcat home>/bin/setenv.sh.

In this example, the foo.jar file will be include in the classpath.

export CLASSPATH="$CLASSPATH /opt/tomcat/bin/foo.jar"

 

Restart Tomcat for this change to take effect.

/opt/tomcat/bin/shutdown.sh
/opt/tomcat/bin/startup.sh

 

The ps command can be used to confirm that Tomcat includes foo.jar in the classpath.

ps -ef | grep -i tomcat

 




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 c1e530 in the box below so that we can be sure you are a human.