Configure the Java agent

The standard installation for all agents uses this order of precedence.

Configure the Java agent using:

You may need to configure your application’s Java environment to work effectively with the agent if your system uses:

  • Standalone applications: If your JVM server hosts a single application you should specify the name using Certain features like route coverage and build-based views require this.

  • Multi-tenant application configuration: If your JVM web server hosts multiple applications during a deployment, you can distinguish applications from each other and then apply individual configuration options.


    In some cases, you may wish to configure the agent to use a single application name but do not wish to treat application server code as belonging to the application. In this case, use instead. Certain features like route coverage and build-based views do not work with as they do with

  • TLS certificates

  • Java 9 Modules

  • Java 2 Security

  • Integrations: The Contrast Java agent, can also be configured and run in conjunction with several third-party tools, plugins and integrations. Consult the remote product documentation for information about how other products work.

Java system properties

Substitute <YourContrastJarPath> with the path to your Contrast JAR, and use these commands to learn more about system properties:

  • To generate a list of general properties using the Contrast agent JAR, use:

     java -jar <YourContrastJarPath> properties
  • Use command line with tools to search for commands. For example, these commands display a list of proxy-related properties:

    Using the built-in filter:

    java -jar <YourContrastJarPath> properties --filter=proxy

Java YAML configuration template

Use this template to configure the Java agent using a YAML configuration file.