Install the Java agent using Contrast

To install the Java agent using the Contrast web interface:

  1. Log in to Contrast.

  2. Select Add Agent in the header.

  3. Select the Java agent in the drop-down menu, then select Download Agent. You may need to specify proxy authentication information required by your network before downloading the agent.

  4. Substitute <YourContrastJarPath> with the path to your Contrast JAR and <AppName> with the name of your application. Then add a JVM parameter to install the Java agent. For example:

    java -javaagent:<YourContrastJarPath> -jar <AppName>.jar

    For more specific examples, select the particular technology you want to use.

  5. Exercise your application by performing either manual or automated testing to ensure your application is functioning correctly with the agent installed. The sensors of the Contrast Java agent will gather information about the application’s security, architecture and libraries.

  6. Verify that your server is registered in Contrast and reports an instance of your application. Select Servers in the header to view registered servers. Verify that your server is registered in this list.

Tip

If you want to download the agent and test with the test application, WebGoat, Contrast has a public repository to help you get started.