Loading

MuleSoft 4.9 & Java 17 Migration- Anypoint Studio-test

Date de publication: Apr 2, 2026
Prérequis
1. Any Mule project 2. Anypoint Studio 7.21+ 3. Java Runtime 17 (JRE 17) 4. Mule Runtime 4.9+ (Mule 4.9+)
Tâche

Please follow the below steps and update the Anypoint Studio version, Mule runtime version, connector versions, and Exchange assets to complete the Java 17 upgrade

 

Étapes

Step 1: Review Current Setup and Plan the Upgrade

 

Make sure to list all the connectors, modules, and dependencies you are currently using, along with their current versions. This way, if you ever need to roll back or just want to see how far behind you are from the latest versions.

 

Before jumping into the upgrade, it is important to have a clear plan. This helps avoid surprises and ensures a smooth transition across environments.

 
  • Inform the desire for upgrade to stakeholders.

  • Define upgrade timeline and milestones.

  • Allocate time for local, QA, UAT, and prod validation.

  • Design rollback and recovery plan.

  • Setup post-upgrade performance/log monitoring

 

Step 2: Validate Connector or Module Compatibility

 

All Anypoint connectors and modules are currently Java 17 compatible. The list of all Java 17 compatible connectors and their versions are available here.

 

There are two (2) ways to validate if your connector is compatible to Java 17. It can be via Anypoint Studio or Anypoint Exchange.

In Anypoint Studio:

 
  1. Open your Mule project in Anypoint Studio.

  2. Right click the Mule project.

  3. Hover to Mule and click Java 17 Module Compatibility.

    4. Wait for few seconds then check Problems tab in the console.

    You should get a confirmation like "All modules are Java 17 compatible."

     

 
 

In Anypoint Exchange:

  1. Login to your Anypoint Platform.

  2. Go to the navigation bar and click Exchange.

  3. In the search bar, type the name of the module or the connector (i.e. "Salesforce Connector - Mule 4").

  4. Click and open the asset.

  5. Click View versions and you would see the compatible Java versions for that asset.

Step 3: Check the Java Runtime and Mule Runtime of Anypoint Studio 

 
  1. Open your Mule project in Anypoint Studio.

  2. Right click the Mule project.

  3. Go to Build Path > Configure Build Path > Libraries tab.

  4. Look for "JRE System Library".

    • If the version is not 17, proceed to Step 4.

  5. Look for "Mule Server".

    • If the version is not 4.9, proceed to Step 4.

  6. If everything is aligned, you may skip Step 5 and Step 5.

 
 

Step 4: Install and set Java 17 in Anypoint Studio

 
  1. Install the Java 17 in your machine.

    1. Windows:

      • Download the JDK

      • Install Java

        • Run the installer and follow setup instructions.

        • If using the ZIP version, extract it to a location.

      • Set Environment Variables

        • Open System Properties > Advanced > Environment Variables

        • Find JAVA_HOME under System Variables (or create a new one if it does not exist) and set the value to the JDK installation path

        • Add %JAVA_HOME%\bin to the Path variable

      • Check java version in command prompt:

        • java -version

    2. macOS:

      • You can use Homebrew to install Java 17:

        • brew install openjdk@17

  2. Configure the JRE 17 in Anypoint Studio.

    • Go to Preferences > Java > Installed JREs > Execution Environment and click on JavaSE-17. If Java 17 is properly installed, the studio should be able to detect it.

    • Click Apply and Close.

    • Restart your Anypoint Studio (if needed)

 
 
 

Step 5: Install and set Mule Runtime 4.9 in Anypoint Studio

 
  1. Open your Anypoint Studio.

  2. Go to Help tab and click Install New Software.

  3. Type and search for Mule Server.

     
  4. Choose Mule Server Runtime 4.9.5 EE.

  5. Click Next until you finish the installation.

  6. Restart your Anypoint Studio (if needed).

 
 
 

Step 6: Update Mule Runtime and Maven Plugin

 

The earliest version for Mule Runtime and Maven Plugin is 4.6.0 and 4.1.0 respectively.

  • See latest version for Mule Runtime in this link.

  • See latest version for Maven Plugin in this link.

 
 
  1. Open your Mule project in Anypoint Studio.

  2. Open your pom.xml file.

  3. Update app.runtime tag under properties tag.

<properties>
    <app.runtime>4.9.0</app.runtime>
    <mule.maven.plugin.version>4.5.0</mule.maven.plugin.version>
    <munit.version>2.3.14</munit.version>
</properties>
  1. Open your mule-artifact.json file.

  2. Update the value of minMuleVersion key.

{
	"minMuleVersion": "4.6.0"
}
 
 
 

Step 7: Update Connectors and Modules

 
  1. Open your Mule project in Anypoint Studio.

  2. Right click the Mule project.

  3. Go to Manage Dependencies > Manage Modules.

    You would see the current version of your modules. If there is a blue dot beside the version, it means that it is not the latest version.

  4. Click the Check for updates icon, then Update all dependencies to latest icon.

  5. Once updated, click Apply and Close.

  6. Restart your Anypoint Studio (if needed).

If properly configured, the application should be successfully deployed in studio.

 
 

Step 8: Update CI/CD Pipeline-related files

 
  1. Open your Mule project in Anypoint Studio.

  2. Open your pom.xml file.

  3. Find your CloudHub configuration and add the following tags:

    1. releaseChannel: Set the name of the release channel used to select the Mule image. Supported values are NONE, EDGE, and LTS. By default, the value is set to EDGE. If the selected release channel doesn’t exist, an error occurs.

    2. javaVersion: Set the Java version used in the deploy. Supported values are 8 and 17. By default, the value is set to 8. If the selected Java version doesn’t exist, an error occurs.

  4. Open your pipeline files, and update the maven and java version.

    Note: Mule Maven plugin versions 3.0.0, 3.1.0, 3.1.1, 3.1.2, 3.1.3, 3.1.4, 3.1.5, 3.1.6, 3.1.7, and 3.8.3 are deprecated. Check the latest versions in this link.

Numéro d’article de la base de connaissances

005317704

 
Chargement
Salesforce Help | Article