解决No compiler is provided in this environment. Perhaps you are running on a JRe

问题产生

在运行maven打包时
虽然像我上一篇文章所说的在路径中加入正确的语句
maven正常运行了
但是却报了这个错
如果不知道加的是什么看一下上一篇文章就好啦

产生原因

运行环境默认配置jre而不是JDK
这样子的话普通的java运行没问题
但是maven运行需要JDK
jre满足不了

解决办法

解决就很简单了,他需要jdk
我们就给他JDK
打开Windows->Preference->Java->Installed JREs->Edit
点击add
解决No compiler is provided in this environment. Perhaps you are running on a JRe_第1张图片
然后
解决No compiler is provided in this environment. Perhaps you are running on a JRe_第2张图片
解决No compiler is provided in this environment. Perhaps you are running on a JRe_第3张图片
把语句加进去,点击ok
处理完毕
感谢大家的支持

你可能感兴趣的:(日常报错,脑抽编程)