When running Tomcat as a Windows service, add the javaagent argument to your Tomcat startup properties. These instructions apply to Apache Tomcat >= 6.x.
To install the Java agent in Tomcat running as a Windows service:
- Ensure that you are using administrator privileges.
- Run the Apache
tomcat<version>w.exe utility to configure your tomcat service to load the agent (where <version> represents the major version number of the tomcat being instrumented).
For example:
tomcat8w //ES//<servicename>
- Click the Java tab and in the Java Options add:
-javaagent:<agent_home>\javaagent.jar
- Restart the Tomcat service to have the changes take effect.