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

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?


Whenever the first time we set up our project code in eclipse and try to execute code, I am very sure most of you came across to one of this common error stating “No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?”.



In this article, we will see how we can resolve this error for the eclipse.


To solve this error for the eclipse we have two simple Methods.

First Method

    1)     On your Eclipse IDE, go into Window > Preferences > Java > Installed JREs > and check your installed JREs. You should have an entry with a JDK there.

2)     In case no entry for JDK, Click on Add and Select Standard VM and add the path of JDK installed on your machine.



3)     Click on Apply and Close option present on the Screen.

Now once we execute our code we won't be facing this error.


Second Method

  • In your project POM.xml inside build, section add maven compiler plugin with the path of your Javac installed in your local and save the changes. 
  • Build your project once again. 
  • Now once again we have executed our code we won't be facing this error.



SHARE THIS

Author:

My Name is Ankur Jain and I am currently working as Automation Test Architect.I am ISTQB Certified Test Manager,Certified UI Path RPA Developer as well as Certified Scrum Master with total 12 years of working experience with lot of big banking clients around the globe.I love to Design Automation Testing Frameworks with Selenium,Appium,Protractor,Cucumber,Rest-Assured, Katalon Studio and currently exploring lot in Dev-OPS as well. I am currently staying in Mumbai, Maharashtra. Please Connect with me through Contact Us page of this website.

Previous Post
Next Post