Workflow: Configuring Java JDK for Studio (Linux and Unix)
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:
Edit the startup file (~/.bashrc).
Modify PATH variable
PATH=/usr/local/jdk1.8.0/bin:$PATH export PATH
Save and close the file.
Load the startup file.
> . /.profile
To verify the configuration of your installation, type
> 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.