No compiler is provided in this environment. Perhaps you are running on a JRE ra

No compiler is provided in this environment. Perhaps you are running on a JRE ra,有需要的朋友可以参考下。

控制台输出的错误信息如下:

[INFO] Scanning for projects...
[INFO]
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building jobserver 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ jobserver ---
[INFO] Using ‘UTF-8‘ encoding to copy filtered resources.
[INFO] Copying 3 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.0:compile (default-compile) @ jobserver ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 198 source files to F:\QunLiVideo\code20141106\jobserver\target\classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.281 s
[INFO] Finished at: 2015-01-21T20:22:29+08:00
[INFO] Final Memory: 9M/158M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.0:compile (default-compile) on project jobserver: Compilation failure
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

网上找到的解决方案如下:

  1. 下载java jdk,并安装java jdk。下载地址:http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
  2. 在eclipse的菜单中,进入 Window > Preferences > Java > Installed JREs > Execution Environments,选择JavaSE-1.6, 在右侧选择jdk.
  3. 然后在maven菜单中使用 “update project ...”.

但是重复尝试了很久都不行。

后来通过同事指点,需要执行下以步骤:

Maven update

Maven clean

project clean
build project

然后再重复的执行Maven Install,直到打包成功为止。

时间: 2024-10-02 19:34:35

No compiler is provided in this environment. Perhaps you are running on a JRE ra的相关文章

No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?

控制台输出的错误信息如下: [INFO] Scanning for projects... [INFO] [INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1 [INFO] [INFO] ----------------------------------------------------

Maven异常: No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK解决(能力工场小马哥)

问题描述: No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK 解决方案:  1- MyEclipse菜单 - Window - Preferences- Java - Installed JREs 将配置的JRE定位到JDK,最好是修改为jdk1.7 现在仍在探索,为什么我现在使用的MyEclipse( 版本2015 CI )里面的Maven JDK下拉选

No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK? 问题

maven编译项目时出错,提示信息如下: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1: Compilation failure [ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK? 在Eclipse的菜单中,进入 Windo

No compiler is provided in this environment. Perhaps you are running on a JRE rather than a...

使用Maven中的maven-build来本地调试项目,启动后在console出现如下错误信息 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile)on project XXXX: Compilation failure [ERROR] No compiler is provided in this environment. Perha

No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK? idea maven 打包报错问题解决

mvn clean install -X -Dmaven.test.skip=true -P dev 打包报错:No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK? idea,项目,maven 也设置了统一的jdk,还是报错, 解决方法1:在maven的setting.xml 文件 <profiles> 标签中加入指定JDK的版本, <profile

[转]在Eclipse整合Maven3.6.3插件导入maven项目并编译时,控制台提示No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?

近日有同事遇到在编译Maven项目时出现[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?的问题, 原以为这是个个例, 源于同事粗心, 配置环境出问题造成, 后到百度查看一下, 遇到这个问题的不在少数, 但是对问题的解释没有说到根源, 于是写下这篇博客供大家参阅, 如有纰漏, 还请指正.错误代码节选: [ERROR] COMPILATION

No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK Maven异常解决方案

出现像以上情况,需要在Eclipse中的preferences->Java->Installed JREs修改JDK的路径 修改之后 在Maven选项中,选择Update project.. 错误应该解决得了!!! 新手,做的笔记!如错误不能解决请另行查找!

eclipse Maven操作出现No compiler is provided in this environment.Perhaps you are running on a JRE rather than a JDK?

右键 pom.xml -> Run as -> Maven install 后出现类似如下错误: 解决方法: 1)选择项目后,点击 eclipse 导航栏中 [Window]-->[Prefrences]-->[Java]-->[Installed JREs]-->Add 选择[Standard VM]---> [Next > ]选择JDK的安装目录确定. 出现如下页面后,点击[Directory ...]选择jdk的安装目录 -->[Finish]

Maven项目 报错No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?

原文地址:https://www.cnblogs.com/xiaosisong/p/11428369.html