---
title: Deploying the Java agent
description: If you are upgrading this integration, we strongly recommend that you reinstall the OpenToken agent in all existing applications (IdP or SP).
component: java
page_id: java:setup:pf_java_ik_deploying_the_java_agent
canonical_url: https://docs.pingidentity.com/integrations/java/setup/pf_java_ik_deploying_the_java_agent.html
revdate: June 21, 2024
section_ids:
  about-this-task: About this task
  steps: Steps
  choose-from: Choose from:
  choose-from-2: Choose from:
---

# Deploying the Java agent

## About this task

If you are upgrading this integration, we strongly recommend that you reinstall the OpenToken agent in all existing applications (IdP or SP).

|   |                                                                                                                                                   |
| - | ------------------------------------------------------------------------------------------------------------------------------------------------- |
|   | As of Java Integration Kit 2.8, there are two versions of the OpenToken agent: the standard OpenToken agent and the Jakarta EE 9 OpenToken agent. |

## Steps

1. If you are upgrading this integration:

   1. Stop your web application.

   2. Remove the existing OpenToken agent file from your Java application server:

      ### Choose from:

      * If you're using the standard OpenToken agent, remove the `opentoken-agent-<version>.jar` from the `agent` folder.

      * If you're using the Jakarta EE 9 OpenToken agent, remove the `opentoken-agent-jakarta-<version>.jar` from the `agent/jakarta` folder

        |   |                                                                  |
        | - | ---------------------------------------------------------------- |
        |   | No code changes are required within applications when upgrading. |

2. From the integration `.zip` archive, copy the version-specific `agent/opentoken-agent-<version>.jar` file to your Java application server and make it available in the `CLASSPATH` of the Java application:

   ### Choose from:

   * If you're using the OpenToken agent, copy the `agent/opentoken-agent-<version>.jar` file.

   * If you're using the Jakarta EE 9 OpenToken agent, copy the `agent/jakarta/``opentoken-agent-jakarta-<version>.jar` file.

3. From the integration `.zip` archive, copy the necessary library file or files to your Java application server and make them available in the `CLASSPATH` of the Java application:

   | Option                           | Description                                                                                                                                     |
   | -------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
   | **Standard OpenToken agent**     | * `agent/lib/commons-beanutils.jar`\*

   * `agent/lib/commons-collections-3.2.2.jar`\*

   * `agent/lib/commons-logging.jar`                         |
   | **Jakarta EE 9 OpenToken agent** | - `agent/jakarta/lib/commons-beanutils.jar`\*

   - `agent/jakarta/lib/commons-collections-3.2.2.jar`\*

   - `agent/jakarta/lib/commons-logging.jar` |

   |   |                                                                                                                                            |
   | - | ------------------------------------------------------------------------------------------------------------------------------------------ |
   |   | Files marked with an asterisk (`*`) are only necessary if you are using the Apache commons multimap function to read and write OpenTokens. |

4. If you are upgrading, restart your web application.

5. Repeat these steps as needed for additional custom applications.

   For a first-time installation, complete the integration as described in [Reading and writing OpenTokens](pf_java_ik_reading_and_writing_opentokens.html) (next) and in either [Identity provider applications](pf_java_ik_identity_provider_applications.html) or [Service provider applications](pf_java_ik_service_provider_applications.html).
