Signup/Sign In
LAST UPDATED: MARCH 31, 2023

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

Technology #jdk#jre

    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. Here is the way to solve No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK Error.

    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 is provided in this environment. Perhaps you are running on a JRE rather than a JDK

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

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

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

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

    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:

    I like writing content about C/C++, DBMS, Java, Docker, general How-tos, Linux, PHP, Java, Go lang, Cloud, and Web development. I have 10 years of diverse experience in software development. Founder @ Studytonight
    IF YOU LIKE IT, THEN SHARE IT
    Advertisement

    RELATED POSTS