Technology3 min read

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

Abhishek Ahlawat

By Abhishek Ahlawat โ€” Recently

Founder of StudyTonight and a MERN fullstack developer. Writes about JavaScript, web development, Linux, and tech.

Summarize this article using AI

If you have downloaded Eclipse or STS IDE for Spring projects, it's possible that while compiling/building/running your Java project you may get the following error with BUILD FAILURE message in the console.

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

This error doesn't mean that your project has some problem but it is just because some wrong Java related configuration in your IDE which you must correct to successfully run your project.

To fix this issue you will have to update your IDE preferences. This solution assumes that you are using Eclipse IDE for development.


Steps to Resolve the Issue

Go to Window > Preferences > Java > Installed JREs > and check your installed JREs. You should have an entry with a JDK there. But because you are seeing this error, you will find an entry for JRE instead, similar to the snapshot below.

no compiler provided error in Eclipse IDE

Now select the entry, click on Edit and then change the path from JRE to JDK.

no compiler provided error in Eclipse IDE

Once you have changed the Installed JRE entry to JDK, click on Apply and Close.

no compiler provided error in Eclipse IDE

If you have a Maven project, Right-Click on your Project > Maven > Update Project

Hope this helps you fix your issue, if not, feel free to post a comment below and we will definitely to help you.

You may also like:

Spotted something outdated or wrong?

Liked this? See more StudyTonight posts in Google results.

Add StudyTonight as a preferred source
Next questLIVE OPSStep 2 / 3

Practice real incidents in the browser

System Design Ops โ€” put out fires, ship fixes, and stack XP. Reading done. Time to play.

Play System Design
  • +XP

    Every sim

  • Incidents

    Live ops

  • Ranks

    Climb up

Read next