Eclipse中,出现No compiler is provided in this environment. Perhaps you are running on a JRE rather than

eclipse Maven 编译失败 错误信息:No compiler is provided in this environment [ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK? 你的JDK里面没有jre文件夹,保证Maven项目的JDK环境与环境变量的JDK一致, 并检查JDK文件夹里面是否有jre文件夹 ----分割线------ 移植Maven依赖包的本... 阅读详情

问题描述:

Eclipse导入Maven项目后,执行 mvn clean install后,出现如下错误:

[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.0:compile (default-compile) on project myproject: 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

大致阅读了一下,说的是执行编译失败,你是不是在JRE环境下运行而不是JDK?闹闹头想了想,JDK已安装、各种环境变量配置木有问题,为什么会出现这种状况呢?寻思了一会儿,知道了原来Eclipse运行是需要一个JRE,而这个JRE并不是系统环境变量中的javac目录下的JRE,而是JDK安装时候自带的JRE目录,此目录下并无javac,故无法进行java的编译,问题找到了,下面说一下具体解决方案。

解决步骤:

在Eclipse的菜单中,进入 Window > Preferences > Java > Installed JREs > Execution Environments,选择JavaSE-1.x, 在右侧选择JDK的安装目录(注意不要选择JRE的目录).

这里写图片描述

然后,进行maven install的时候就会找得到javac了。

1.5元主控搞定高精度电流电压采集?STC8G1K08+INA180A3硬件设计全解析 本文详细解析了如何利用成本仅1.5元的STC8G1K08单片机与INA180A3电流检测放大器,构建一套高精度、低成本的电流电压采集系统。文章深入剖析了硬件设计精髓,包括利用MCU内部上拉电阻直驱数码管以节省成本、INA180A3的配置与计算,以及实现高频率采集并与上位机高速通信的软件策略,为嵌入式开发中的极致性价比设计提供了完整方案。 阅读详情

相关推荐

【STK】手把手教你利用STK进行光电红外仿真04-STK/EOIR模块的实战操作1航天器星载相机对LEO卫星成像

今天引入一个实际的场景,帮助大家完成对于这个模块的理解与运用。

weixin_44184852的博客 2388

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

对maven项目执行一些操作时,如maven clean/maven test/maven install等 出现异常:No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK? 可能由于以下几种情况导致: 1. 开发工具没有指定jdk。设置jdk: ecl...

随风 1万+

爱普生l360清零软件 .rar

绝对好用l360操作简易!爱普生L360适用,爱普生L360适用!废墨清零!

cmd 命令执行 mvn compile 报错:No compiler is provided in this environment. Perhaps you are running on a JR

cmd 命令执行 mvn compile 报错:No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?

weixin_45447134的博客 1万+

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

idea 使用 Terminal 打包 maven 项目时,报 No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK? 遇到的问题 命令行下 Maven 环境未配置 虽然在 idea 中配置了 maven,不过在使用 idea 中的 Terminal,默认时调...

hochenchong的博客 4万+

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

一般遇到这种错误是因为工作空间中没有配置运行环境,或者配置的运行环境有问题。一般我们在工作空间中配置tomcat运行环境时通常会使用其默认的jre环境,而这个错误的意思是No compiler is provided in this environmentPerhaps you are running on a JRE rather than a JDK 没有提供编译环境,或许你可以使用JDK来...

huckers的博客 4473

maven clean package 失败 "No compiler is provided in this environment. Perhaps you are running on a "

maven clean package 失败出现异常: [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile ...

百物易用是苏生 600

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

Eclipse中,No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK? 问题的解决方案 By 阿超  发表于 2015-3-31 文章目录 1. 起因2. 问题说明3. 解决方案 起因 阿超的电脑前几天由于特殊原因无法开机,无奈重装

Nishuibaichuan 的博客 1228

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

No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK myeclipse2014 配置 maven 3.3.3 ,在myeclipse中, 点击pom.xml 文件时,报的错误, 解决办法:  1、eclipse菜单 - Window

zhouzhiwengang的专栏 3206

Maven Install报错:Perhaps you are running on a JRE rather than a JDK?

所遇问题: 英文描述: [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 pro...

GoodIdea 936

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

所遇到的问题: 详情报错:   英文描述: [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 c...

weixin_30951389的博客 122

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

问题说明 Eclipse导入Maven项目后,执行 mvn clean install后,出现如下错误: [INFO] ------------------------------------------------------------------------[ERROR] Failed to execute goal org.apache.maven.p...

weixin_30906425的博客 84

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

控制台输出的错误信息如下: [plain] view plain copy [INFO] Scanning for projects...   [INFO]    [INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.Single

java开发鼻祖 348

Jenkins部署好项目以后报错No compiler is provided in this environment. Perhaps you are running on a JRE

报错信息如下所示: Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.6.2:test (default-test) on project project_name: There are test failures. ERROR] No compiler is provided in this env...

wise18146705004的博客 6239

idea中报错No compiler is provided in this environment. Perhaps you are runningon a JRE

问题描述 用idea中终端执行maven的package命令,出现 No compiler is provided in this environment. Perhaps you are running on a JRE 错误 解决方法 一 在项目的pom.xml中加入: <build> <plugins> <plugin> <!--提供打包(将应用打包成可执行的jar包)--&g...

qq_34823218的博客 3万+

Java项目打包报错 No compiler is provided in this environment. Perhaps you are running on a JRE rather than

mvn clean install打包找不到JDK问题

大家好,我是云村的王子 6676

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

一直使用的是eclipse,最近转到IDEA。第一次使用maven打包时控制台报No compiler is provided in this environment. Perhaps you are running on a JRE rather than JDK?这样的错误。如果是在eclipse中看到这句话,可以到设置中查看下环境配置的是jre还是jdk。基本上把maven的编译环境换成jd...

liulinlin360的专栏 9498

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

首先这个是由于java的原因造成的 一方面:JAVA_HOME环境没配好有可能导致改错误(这里用的是jdk不是jre) 另一方面就是你的java本身不对:jdk目录下面没有jre,像下面这样 而不是只有一个bin和lib,如果是只有bin和lib的情况那就可能会导致这个错误了 希望会有所帮助! 最后附上好的java安装方法 在官网直接下的一般是不行的,会只有bin和lib 我推荐用360软件管家...

Will_Pass的博客 1万+
上一篇: 如何修改maven的JDK版本
下一篇: 遍历Map集合的四种方式
csdn_lzg
博客等级 码龄10年 0粉丝 8原创
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值