• Register
0 votes

Problem :

I want to compile a project in Eclipse using the m2eclipse. I set my JDK path in Eclipse as below:

Windows-->preferences-->installed jres--> jdk1.7.xx  path

But this is showing me below error

[INFO] -------------------------------------------------------------
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE    rather than a JDK?
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------


7 5 2
3,870 points

Please log in or register to answer this question.

2 Answers

0 votes

Solution :

1.On the Eclipse IDE, just go into the Window > Preferences > Java > Installed JREs > and just try to check your installed JREs. You should have some entry with your JDK there.

2.Select your Execution Env and click OK

3.Then just Right-Click on the Project -> Maven -> Update Project

You can change your Maven JRE as follows. You need to Go to Run -> Run Configurations, selecting your Maven Build I was running (from my left panel). Then just click a JRE tab and select a option Workspace default JRE


1.Set your JAVA_HOME environment variable to a JDK root folder it is required if you run command line or the maven (mvn).

2.From a project properties in a section Java Compiler select a required JDK it is required if you run it directly from a eclipse

9 7 4
38,600 points
0 votes

If you have downloaded Eclipse or STS IDE for spring projects, it is possible that while compiling or running 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.”

What does this error describe?

This error does not mean that your project has some problems but is because some wrong java related configuration in your IDE which you must correct to successfully run your project.


To fix this solution you have to update your IDE preferences. The solution assumes that you are using the Eclipse for project development.

Steps to resolve the issue:

  • Go to windows -> Preferences -> Java -> Installed JREs and after that check your installed JREs. You should have an entry with JDK there. But because you are seeing this error, you will find an entry for JRE instead.
  • Now select the entry. Click on it and Edit. After that change the path from JRE to JDK.
  • Once you have changed the installed JRE to JDK, Click on Apply and close.
  • If you have a Maven project, Right-click on your project -> Maven -> Update project.

I hope this will help to solve your issue.

11 5 2
3,890 points

Related questions

0 votes
1 answer 5 views
Problem: web.xml is missing and <failonmissingwebxml> is set to true.
asked Feb 17 Dan phillip 1.9k points
0 votes
1 answer 15 views
Problem: java se development kit (jdk) was not found on this computer.
asked Feb 16 Ethan ross 1.8k points
1 vote
2 answers 270 views
Problem: Dear all, Right now I&rsquo;ve imported a maven project into my eclipse IDE and I changed my java path library to work on java 1.7 Suddenly, eclipse started showing an error but I&rsquo;ve got no errors in my files there. The error is &ldquo;java compiler level ... Project Problem (Java Version Mismatch) Please tell me how to resolve this error (I want to have my JRE version as 1.7 only).
asked Mar 22, 2020 Gavin 15.3k points
1 vote
1 answer 320 views
Problem: Hello Guys, I am trying to import a Maven project in my Eclipse IDE but the project is not importing properly. It shows an error, source folder is not a java project when I m trying to give it a new call-in it. The problem is literally going over my head ... the problem, as well as have a solution, please speak up. I'm surfing over the internet for an hour but couldn&rsquo;t fix this yet.
asked Apr 2, 2020 Gavin 15.3k points
0 votes
1 answer 73 views
Problem: I am very new to eclipse and maven. Currently I am using the Eclipse Luna with a m2e plug-in. If I try to search for dependencies then I immediately receive the subsequent warning message: &ldquo;Index downloads are disabled, search result may be incomplete. ... exact solution on my above error. So I want to know the way to enable index downloads in my Eclipse for Maven dependency search.
asked Aug 13, 2020 Raphael Pacheco 4.9k points
0 votes
1 answer 53 views
Problem : I created a project by Maven integration in Eclipse , but in the work space in all JSP files have bellow message: The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path
asked Oct 31, 2019 peterlaw 6.9k points
0 votes
1 answer 15 views
Problem: could not publish to the server. java.lang.indexoutofboundsexception
asked Feb 12 Shovo210 2.9k points
0 votes
1 answer 15 views
Problem: I am trying to load Java Web App into the Eclipse (via the Import Maven Project) but I am facing below error which says: "Cannot change version of project facet Dynamic Web Module to 2.5". I am trying to do research on the above error and one thing I ... >  <installed facet="wst.jsdt.web" version="1.0"/> </faceted-project> Can someone help me in fixing above project facet related error.
asked Jul 7, 2020 Raphael Pacheco 4.9k points
0 votes
0 answers 36 views
Problem: I have fundamental knowledge of Java and Maven. I am currently using the maven to create the dynamic webapp in a Eclipse IDE. I have already added some folders like src/test/java and src/test/resources. Also I have changed a library in a Java Build ... change version of project facet Dynamic Web Module to 3.1. I have already changed everything that would affect the changing I guess so.
asked Jun 16, 2020 Raphael Pacheco 4.9k points
0 votes
1 answer 11 views
Problem: I am getting the Maven error "The JAVA_HOME environment variable is not defined correctly" when I run through Inno setup batch execution. However, I am able to run successfully outside Inno Setup.(e.g Command line, Batch file, Vbs). I am clueless to identify the issue.
asked Feb 20 Ali 4.8k points