Showing results for 
Show  only  | Search instead for 
Did you mean: 

This product reached the end of support date on March 31, 2021.

Integrating agent with Java based Windows Service

Dynatrace Helper
Dynatrace Helper


We're trying to integrate a java agent with a java based windows service, we have tried adding the agentpath to batch files, adding it to the registry and editing the path environment variable, and we searched for a wrapper.conf file, but this service does not use one.

The strange part is that by adding the agent string to the command line, we were able to connect the agent, but this is a manual process, and we need to start it automatically as a service.

Using ps explorer we can even see the agent string in the running process, but the agent doesn't actually connect.

Has anyone ran into something similar? Thanks.


Dynatrace Leader
Dynatrace Leader

Another option is to use the JAVA_OPTS environment variable. This will apply to any process where this environment variable is in scope. Given you're trying to affect a system level service, it might be necessary to set it at the system level.

But if you're seeing the agent string in the running process using process explorer, then it's unclear which mechansim you're using to accomplish the injection. Was this thru the command line manual technique? If you're getting the agent string into the process but it still does not connect, then we want to take a closer look into why that's not working. So I suggest we focus on one step at a time, first determining how you're going to inject the -agentpath argument, then once it's confirmed to be in the process, we can focus on why the agent isn't connecting.

Hi Joseph,

The mechanism we're currently using is the imagepath in the registry, outlined here:

However, we have also used the AppParameters registry setting, where memory allocation, such as "-Xmx" is defined. Both of these mechanisms result in the agent string visible in ps explorer, yet the agent does not start up or even generate a log file as if it even tried to start up.

We have not found a file which utilizes the JAVA_OPTS variable, though perhaps a "set JAVA_OPTS" line could be added somewhere, that is likely a question for the vendor though.

Thanks for the reply!



@Cody K.Can you provide the application you are trying to instrument? Maybe someone here has instrumented it before. Some applications use wrapper.conf, some server.conf, and other custom files. Asking the vendor would be the quickiest, or not depending on thier responsiveness I suppose.

Hi Gregg,

The Application is Documentum CTS, the only historical information I can find is a forum post from a few years ago:

We've tried the solution outlined there and it's the same results as above, when adding the the App Parameters