---
schema_version: "1"
id: 8517f1d1b48891bb4b2e5a907b0e6d3e9da7086ff81790d8863f732eddbac1ec
title: Upgrading Java for Policies and API Proxies
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/general/upgrade-policies-proxies.md
canonical_url: https://docs.mulesoft.com/general/upgrade-policies-proxies
source_site: docs.mulesoft.com
content_type: documentation
content_hash: c6b127ed21d9433230cba1e6cbb1ede0b9588cdf3d05746e285b7005f4524baf
description: MuleSoft Documentation Site
latest: true
---
---
product: Getting Started
keywords: java upgrade, api policies, api proxies, automated policies, custom policies, api-level policies, mulesoft upgrade
---

# Upgrading Java for Policies and API Proxies

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

Extended support for Java 8 and 11 ends in February 2027 for 4.6 LTS. Upgrade your apps that run on
Java 8 or 11.

Upgrade your policies and API proxies to be compatible with Java 17.

## Upgrading Automated Policies

Upgrade your automated policies (included and custom) to Java 17.

### Upgrading Included Automated Policies

To upgrade automated [MuleSoft included policies](https://docs.mulesoft.com/mule-gateway/policies-included-directory) to
Java 17:

1.  In API Manager, go to **Automated Policies**.

2.  In **Policy version**, select the latest version of the included policy.

3.  In **Rule of application**:

    - If your policy is on the latest version:

      - To apply included policies to all Mule runtimes, select **All runtimes** and click
        **Apply**.

      - To apply the included policies to Omni Gateways only, select **Omni gateways only** and
        click **Apply**.

      - To apply the included policies to Mule Gateways only:

        1.  Select **Mule gateways only**.

        2.  In **From version** and **To**, enter the Mule version range.

        3.  In **Java Versions**, select **All Java versions** or **Choose specific Java versions**.

        4.  Click **Apply**.

    - If your policy is not on the latest version:

      - To apply included policies to all Mule runtimes, select **All runtimes** and click
        **Apply**.

      - To apply the included policies to Omni Gateways only, select **Omni gateways only** and
        click **Apply**. Note that the **Rule of application** section must be the same as the
        **Rule of application** section in the latest version or else you might have unprotected
        APIs.

      - To apply the included policies to Mule Gateways only:

        1.  Select **Mule gateways only**.

        2.  In **From version** and **To**, enter the Mule version range.

        3.  In **Java versions**, select **Choose specific Java versions** and select Java 8 and
            Java 11.

        4.  Click **Apply**.

        5.  Click **Add automated policy** and add the same automated policy.

        6.  Click **Advanced options**.

        7.  Select **Mule gateways only**.

        8.  In **From version** and **To**, enter the Mule version range.

        9.  In **Java versions**, select **Choose specific Java versions** and select Java 17.

        10. Click **Apply**.

### Upgrading Custom Automated Policies

To upgrade custom automated policies to Java 17:

1.  In API Manager, go to **Automated Policies**.

2.  Upgrade the required extensions and connectors to Java 17.

    - If your custom policy has Anypoint Connectors, see
      [Upgrading Anypoint Connectors and Modules](https://docs.mulesoft.com/general/java-support#anypoint-connectors-and-modules).

    - If your custom policy has custom connectors, see
      [Upgrading Custom Connectors](https://docs.mulesoft.com/general/java-support#custom-connectors).

3.  [Upgrade the custom policy](https://docs.mulesoft.com/mule-gateway/policies-custom-java-version).

4.  [Package the custom policy](https://docs.mulesoft.com/mule-gateway/policies-custom-package).

    Configure Java 17 locally to make custom policies compatible with Java 17.

5.  [Republish the custom policy to Exchange](https://docs.mulesoft.com/mule-gateway/policies-custom-upload-to-exchange).

6.  Apply the new version of the custom policy that is compatible with Java 17 to the API instance:

    1.  Go to **Policies**.

    2.  In **Applied policy status**, verify that the latest definition is applied.

        - If the latest definition is applied, click on the More (…​) menu and select **Check for
          implementation updates**.

        - If the latest definition is not applied, update to the latest definition.

## Upgrading API-Level Policies

Upgrade your API-level policies (included and custom) to Java 17.

### Upgrading Included API-Level Policies

To upgrade API-level [MuleSoft included policies](https://docs.mulesoft.com/mule-gateway/policies-included-directory) to
Java 17:

1.  In API Manager, go to **API Administration** > **{API Name}** > **Policies** > **Add a policy**
    to [apply policies](https://docs.mulesoft.com/mule-gateway/policies-included-apply) at the individual API level.

2.  Upgrade each of your API-level policies:

    1.  In **Policy version**, select the latest version of the included policy.

    2.  In **Method & resource conditions**, select either **Apply configuration to all API method &
        resources** or **Apply configuration to specific API method & resources**.

    3.  Click **Apply**.

### Upgrading Custom API-level Policies

To upgrade custom API-level policies to Java 17:

1.  In API Manager, go to **API Administration** > **{API Name}** > **Policies** > **Add a policy**
    to [apply policies](https://docs.mulesoft.com/mule-gateway/policies-included-apply) at the individual API level.

2.  Upgrade the required extensions and connectors to Java 17.

    - If your custom policy has Anypoint Connectors, see
      [Upgrading Anypoint Connectors and Modules](https://docs.mulesoft.com/general/java-support#anypoint-connectors-and-modules).

    - If your custom policy has custom connectors, see
      [Upgrading Custom Connectors](https://docs.mulesoft.com/general/java-support#custom-connectors).

3.  [Upgrade the custom policy](https://docs.mulesoft.com/mule-gateway/policies-custom-java-version).

4.  [Package the custom policy](https://docs.mulesoft.com/mule-gateway/policies-custom-package).

    Configure Java 17 locally to make custom policies compatible with Java 17.

5.  [Republish the custom policy to Exchange](https://docs.mulesoft.com/mule-gateway/policies-custom-upload-to-exchange).

6.  Apply the new version of the custom policy that is compatible with Java 17 to the API instance:

    1.  Go to **Policies**.

    2.  In **Applied policy status**, verify that the latest definition is applied.

        - If the latest definition is applied, click on the More (…​) menu and select **Check for
          implementation updates**.

        - If the latest definition is not applied, update to the latest definition.

## Upgrading API Proxies

> [!IMPORTANT] To ensure your API proxies or Mule apps are protected when upgrading, upgrade your
> API policies **before** upgrading your API proxies or Mule apps.

The steps to upgrade are a little different, depending on your **Proxy type**:

- Basic endpoint:

  - If you use Basic endpoint, deploy the adapted application to the server from Mule runtime and
    connect it to API Manager using autodiscovery. For more information, see
    [Configuring Mule Gateway API Autodiscovery in a Mule 4 Application](https://docs.mulesoft.com/mule-gateway/mule-gateway-config-autodiscovery-mule4).

  - If you use a Basic endpoint API instance to update your instance, update the Mule application
    connecting to your API instance.

- If you use a proxy application, see the following sections for deployment type:

  - [CloudHub and CloudHub 2.0 Deployments](#cloudhub-and-cloudhub2-deployments)

  - [Hybrid Deployments](#hybrid-deployments)

  - [Runtime Fabric Deployments](#runtime-fabric-deployments)

### CloudHub and CloudHub 2.0 Deployments

Before following these steps, ensure your policies are updated. For more information, see
[Upgrading Automated Policies](#upgrading-automated-policies) and
[Upgrading API-Level Policies](#upgrading-api-level-policies).

1.  In API Manager, go to **API Administration > Settings**.

2.  [Edit the API instance’s configuration settings](https://docs.mulesoft.com/api-manager/latest/edit-api-endpoint-task):

    1.  In **Runtime Channel**, select the runtime channel to use.

    2.  In **Version**, select **4.6.0** or later.

    3.  In **Java version**, select **Java 17**.

3.  Click **Save & Apply**.

### Hybrid Deployments

Before following these steps, ensure your policies are updated. For more information, see
[Upgrading Automated Policies](#upgrading-automated-policies) and
[Upgrading API-Level Policies](#upgrading-api-level-policies).

1.  Deploy Mule runtime engine 4.6.x in a new server running on Java 17 and start the server. For
    more information, see [Add Servers to Runtime Manager](https://docs.mulesoft.com/runtime-manager/servers-create).

2.  Select the new target you created running on Java 17 and, in API Manager, go to **API
    Administration > Settings**.

3.  [Edit the API instance’s configuration settings](https://docs.mulesoft.com/api-manager/latest/edit-api-endpoint-task):

    1.  In **Select target**, select the server running on Java 17 as the target.

4.  Click **Save & Apply**.

5.  After the server successfully runs on Java 17, shift your traffic gradually to the new server
    using a load balancer and turn off the old server after all of its apps are migrated.

### Runtime Fabric Deployments

Before following these steps, ensure your policies are updated. For more information, see
[Upgrading Automated Policies](#upgrading-automated-policies) and
[Upgrading API-Level Policies](#upgrading-api-level-policies).

1.  Deploy Mule runtime engine 4.6.x in a new server running on Java 17 and start the server. For
    more information, see
    [Deploying API Proxies to Runtime Fabric](https://docs.mulesoft.com/runtime-fabric/latest/proxy-deploy-runtime-fabric).

2.  Select the new target you created running on Java 17 and, in API Manager, go to **API
    Administration > Settings**.

3.  [Edit the API instance’s configuration settings](https://docs.mulesoft.com/api-manager/latest/edit-api-endpoint-task):

    1.  In **Runtime Channel**, select the runtime channel to use.

    2.  In **Version**, select **4.6.0** or later.

    3.  In **Java version**, select **Java 17**.

4.  Click **Save & Apply**.

5.  After the server successfully runs on Java 17, shift your traffic gradually to the new server
    using a load balancer and turn off the old server after all of its apps are migrated.

## See Also

- [Java Support](https://docs.mulesoft.com/general/java-support)
