Salesforce

Anypoint Studio 7.8 or earlier version does not recognize correct JDK location on Windows

« Go Back

Information

 
Content

SYMPTOM

When opening Studio 7.8 or previous versions on a Windows machine (after installing a JDK correctly), Studio fails to launch and gives an error window reading - A Java Development Kit (JDK) must be installed in order to run Anypoint Studio. Please install a JDK and try again. 
 

CAUSE

This is caused by an incorrect environment variable path in Windows. When installing the JDK, the installation wizard automatically creates some environment variables pointing to a Java executable. Studio attempts to launch using this Java executable rather than a valid JDK. 
 

SOLUTION

The issue can be resolved by adding the correct JDK location to the Path and giving it precedence over the automatically created attributes. 

1. Open the Window Run prompt with the keystroke Windows+R and write sysdm.cpl. Then, click on the OK button.

2. Click the Advanced tab and then click on the Environment Variables button.

3. Note that there are two sets of variables: User variables and System variables. We are going to edit the System variables, so click on the New... button that's under System variables title.

4. Create a variable called JAVA_HOME and its value place the path to the JDK installation location. Save the change.

5. Go back and edit the Path user variable. There, add a new attribute to the path. This should have a value of %JAVA_HOME%/bin. Most importantly, move this new attribute to the top of the list, before the other attributes point to the Javapath. 

6. Save all changes and exit. Re-opening Anypoint Studio should now point to the valid JDK. 

Attachments

Powered by