Workflow: Configuring Java JDK for Studio (Windows)
After downloading the JDK from Oracle’s site and following the installation instructions, make sure that the JAVA_HOME environment variable is pointing to your JDK installation:
In Search, search for System (Control Panel) and select it.
Click Advanced System Settings.
Click Environment Variables.
In System Variables, select the PATH environment variable.
If the PATH environment variable does not exist, click New.
In Edit System Variable (or New System Variable), make sure that the JDK 1.8.0/bin directory is the first item in your PATH environment variable, and click OK.
Blank spaces are not allowed when defining a path on Windows.
Reopen Command prompt window, and verify that you configured your installation correctly
> java -version
This should print the version of the java tool. If the version is old or you get the error "java: Command not found", then the JDK is not properly installed.
Under certain circumstances, if you had a JRE installation previous to installing the JDK, your default VM could still be configured as the JRE.
To correct this, configure Anypoint Studio to point to your JDK installation as the default VM.
After doing so, if Anypoint Studio still does not recognize your JDK installation, consider uninstalling your the JRE.