Hi when I run on my cmd the command
mvn clean package
I get a compiler error: No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
But I checked out my PATH, JAVA_HOME and HOME_M2
I also checked the Installed JREs in Eclipse:
Apparently everything is ok, any ideas about why do I'm getting that error? Thanks!
Your problem is that in your PATH
is only a JRE, not a JDK.
You have to include the JDK into your PATH
, then maven will find it.
https://roufid.com/no-compiler-is-provided-in-this-environment/
Do set your JAVA_HOME.
export JAVA_HOME=path_to_jdk
try again
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.