Skip to main content
Version: 25.3.0

Apache Tomcat

Please refer to the Proposed Directory Structure section in this document for assistance with the steps below.

Basic Configurations

  1. Go to <absolute-path-to-tomcat>/bin.

  2. Open (or create if it doesn’t already exist) setenv.sh (Linux) or setenv.bat (Windows) file.

  3. Set options (the property file can use any name):

    • On Linux:
    JAVA_OPTS="-javaagent:/opt/waratek/agent/waratek.jar -Dcom.waratek.OceanicProperties=/opt/waratek/conf_*/<name of property file> $JAVA_OPTS"
    • On Windows:
    set JAVA_OPTS=-javaagent:<absolute-path-to-agent-home-folder>\agent\waratek.jar -Dcom.waratek.OceanicProperties=<absolute-path-to-agent-home-folder>\<conf_*>\<name of property file> %JAVA_OPTS%
  4. Restart the Tomcat server. The server must be restarted for the changes to take effect.

Launch Apache Tomcat as a Service in Windows

Running as a Windows Service

  1. Go to <absolute-path-to-tomcat>\bin.

  2. Open the Tomcat<version_number>w.exe file.

  3. In the Monitor Tomcat GUI, check that the Service Status is Stopped.

  4. In the Java Options field add:

    -javaagent:<absolute-path-to-agent-home-folder>\agent\waratek.jar

    -Dcom.waratek.OceanicProperties=<absolute-path-to-agent-home-folder>\<conf_*>\<name of property file>

    Leave any existing Java options unmodified (e.g. -Dcatalina.home, -Dcatalina.base, -Djava.endorsed.dirs, -Djava.io.tmpdir, -Djava.util.logging.manager, -Djava.util.logging.config.file).

  5. Click Apply.

  6. Go to the General tab, start the Tomcat service to have the changes take effect.