简体   繁体   中英

No compiler is provided in this environment. When execute mvn clean package

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM