Change the JDK from Studio

Anypoint Studio 7.3 and later require JDK 1.8 to launch. These instructions change the JDK used to start up your Mule runtime in your Studio environment.

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

Configuring the JDK Version for your Studio Projects

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

  2. Under Java, Installed JREs, select the JDK version you want to use.

    installed jres

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

    1. Go to Add…​, and select your type of installed JRE:

      • MacOS X VM for MacOS.

      • Standard VM for Windows and Linux.

    2. Click Next.

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

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

    5. Click Finish.

Configuring the JDK Version for a Specific Project

  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.

    change jdk project

Was this article helpful?

💙 Thanks for your feedback!

Edit on GitHub