Contact Us 1-800-596-4880

Selecting a Different Java Version to Run the Embedded Mule Runtime Engine

You can select any of your installed JREs as the default Java runtime environment that Studio uses to run your Mule project.

You can select the version of the JDK to use for the project that is compatible with the Mule runtime version the project runs on.

Learn more about compatible versions of Java at Anypoint Studio Release Notes.

Select the Java Version for All Your Studio Projects

  1. In Studio, click Anypoint Studio, and Preferences.

  2. Under Java, Installed JREs, select the JRE version to use.

    Preference window listing the installed JREs.

    If your installed JRE version does not appear, you must configure it:

    1. Go to Add and select your installed JRE type:

      • MacOS X VM for MacOS.

      • Standard VM for MacOS, Windows, and Linux.

    2. Click Next.

    3. In JRE Home, click Directory and select the folder where you have installed JRE.
      For example, /Library/Java/JavaVirtualMachines/jdk-11.0.3.jdk/Contents/Home

    4. In JRE Name type in a descriptive name for the JRE.
      For example, Java SE 11.

    5. Click Finish.

Migrate Your Project to a Different Java Version

Studio 7.17.0 and later are compatible with Java 17, so you can upgrade connectors and apps in your projects to obtain its latest features.

  1. Right-click in your Studio project.

  2. Navigate to Build Path, and click Configure Build Path.

  3. In the Libraries tab, select your JRE System Library and click Edit.

  4. Select the Alternate JRE option, and select your desired JRE from the drop-down menu.

    Edit Library window displaying the alternate JRE options.

If you select Java 17 for your project, Studio automatically searches Exchange and suggests the modules and connectors to upgrade to make your app compatible with Java 17.

If you find issues, you can troubleshoot them and then deploy your project to the appropriate environment with Java compatibility checks.