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

The Author

Narayanaswamy

Hello! I am Narayanaswamy founder and admin of narayanatutorial.com. I have been working in IT industry more than 7 years. NarayanaTutorial is my web technologies blog. My specialties are Java / J2EE, Spring, Hibernate, Struts, Webservices, PHP, Oracle, MySQL, SQLServer, Web Hosting and Website Development. I am a self learner and passionate about training and writing. I am always trying my best to share my knowledge through my blog.

Leave a Reply