Upgrading Java for Policies and API Proxies | MuleSoft Documentation
# Upgrading Java for Policies and API Proxies
Standard support for Java 8 and 11 ends in March 2025 for Mule 4.8 Edge and February 2026 for 4.6 LTS. Plan your upgrade path for apps that are running on Java 8 or 11 accordingly.
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 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 Flex Gateways only, select **Flex 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 Flex Gateways only, select **Flex 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.
     * If your custom policy has custom connectors, see Upgrading Custom Connectors.
  3. Upgrade the custom policy.
  4. Package the custom policy.
Configure Java 17 locally to make custom policies compatible with Java 17.
  5. Republish the custom policy 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 to Java 17:
  1. In API Manager, go to **API Administration** > **{API Name}** > **Policies** > **Add a policy** to apply policies 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 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.
     * If your custom policy has custom connectors, see Upgrading Custom Connectors.
  3. Upgrade the custom policy.
  4. Package the custom policy.
Configure Java 17 locally to make custom policies compatible with Java 17.
  5. Republish the custom policy 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
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.
    * 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
    * Hybrid 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 and Upgrading API-Level Policies.
  1. In API Manager, go to **API Administration > Settings**.
  2. Edit the API instance’s configuration settings:
    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 and 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.
  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:
    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 and 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.
  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:
    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