Are you also facing an error that says – No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
Problem Error
Error occurs during running: mvn clean install
on a Java Maven project
No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
The reason for this issue
This is happening because, either the JAVA_HOME variable is not set properly or you are pointing to JRE instead of JDK.
The solution to the Problem
Try to Set the JAVA_HOME environment variable to your system JDK root folder.
- For the Linux command line, follow this – https://askubuntu.com/questions/175514/how-to-set-java-home-for-java
- For Windows: https://stackoverflow.com/questions/2619584/how-to-set-java-home-on-windows-7
- To fix it in Eclipse – https://stackoverflow.com/questions/19655184/no-compiler-is-provided-in-this-environment-perhaps-you-are-running-on-a-jre-ra
If you are still not able to resolve it, please feel free to put your queries/questions in the comment section below. Thanks!
Feel free to share your thoughts on this topic in the comments section below 👇 We would be happy to hear and discuss the same 🙂