所遇到的问题:

关于Eclipse中使用Maven进行Install安装时候报错Perhaps you are running on a JRE rather than a JDK?解决办法 随笔 第1张

详情报错:

  英文描述:

SRE实战 互联网时代守护先锋,助力企业售后服务体系运筹帷幄!一键直达领取阿里云限量特价优惠。
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.5.1:compile (default-compile) on project busiservice: Compilation failure
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?

中文描述此环境中未提供编译器,你可能使用jre运行而不是jdk。
引发原因Eclipse默认在jre上运行,maven install 编译需要jdk中的编译器,而jre中并没有

解决问题:

关于Eclipse中使用Maven进行Install安装时候报错Perhaps you are running on a JRE rather than a JDK?解决办法 随笔 第2张

Window->Preferences

关于Eclipse中使用Maven进行Install安装时候报错Perhaps you are running on a JRE rather than a JDK?解决办法 随笔 第3张

 

 Java->Installed Rres->Add

关于Eclipse中使用Maven进行Install安装时候报错Perhaps you are running on a JRE rather than a JDK?解决办法 随笔 第4张

Directory...

关于Eclipse中使用Maven进行Install安装时候报错Perhaps you are running on a JRE rather than a JDK?解决办法 随笔 第5张

jdk->ok

关于Eclipse中使用Maven进行Install安装时候报错Perhaps you are running on a JRE rather than a JDK?解决办法 随笔 第6张

Java->Installed JREs->Execution Environments->JavaSE-1.7->jdk1.x

关于Eclipse中使用Maven进行Install安装时候报错Perhaps you are running on a JRE rather than a JDK?解决办法 随笔 第7张

Java->Installed JREs->Execution Environments->JavaSE-1.8->jdk1.x

问题解决:

关于Eclipse中使用Maven进行Install安装时候报错Perhaps you are running on a JRE rather than a JDK?解决办法 随笔 第8张

 



扫码关注我们
微信号:SRE实战
拒绝背锅 运筹帷幄