Signup/Sign In

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

Posted in Tricks   LAST UPDATED: AUGUST 9, 2021

    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:

    Published by: iamabhishek
    Tags:JavaEclipse IDE
    IF YOU LIKE IT, THEN SHARE IT
     

    RELATED POSTS