Friday 17 June 2016

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

If you are like many Java developer who uses Maven and Eclipse to build Java project using M2Eclipse plugin, you might have seen this error before. I ran into it recently when I ran the Maven Install command for one of the Java projects, configured as Maen project,  only to realize that Maven builds failed after throwing this error. The main reason for this error is that Maven is not able to find javac (the Java compiler) which is required to compile Java source file. If you remember, the javac command comes in the bin directory of JDK, hence, you need a JDK installation in your local machine to compile Java project. You also need to have that configured in Eclipse as Installed JRE. Most likely, you have only installed and set up JRE and not JDK, at least that was the reason it throws "No compiler is provided in this environment" in my machine.
Read more »

No comments:

Post a Comment