No compiler is provided in this environment

No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?

Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile (default-compile) on project <project-name>: Compilation failure

No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?

No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?

Solution

Go to Windows –> Preferences –> Java –> Installed JREs

Installed JREs Eclipse
Installed JREs Eclipse

Click on Add

Add JRE - JRE Type Eclipse
Add JRE – JRE Type Eclipse

Select Standard VM and then click on Next

Add JRE - JRE Definition Eclipse
Add JRE – JRE Definition Eclipse

Click on Directory to select JRE. You need to select installed JDK home path in your system as follows.

Add JRE - JRE Definition Path Eclipse
Add JRE – JRE Definition Path Eclipse

Click on Finish button. Then select JDK and click on Apply and Close as follows.

Installed JRE - JDK Selection Eclipse
Installed JRE – JDK Selection Eclipse

Right Click on your project –> Maven –> Update Project

Maven Update Project
Maven Update Project

Leave a Reply