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

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

所遇到的问题:

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

详情报错:

  英文描述:

[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?解决办法)