eclipse中执行maven的compile命令,报错No compiler is provided in this environment

关于Maven项目build时出现No compiler is provided in this environment的处理 近日有同事遇到在编译Maven项目时出现 [ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK? 的问题, 原以为这是个个例, 源于同事粗心, 配置环境出问题造成, 后到百度查看一下, 遇到这个问题的不在少数, 但是对问题的解释没有说到根源, 阅读详情

下面介绍eclipse maven操作正常出现的No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK? 错误的解决办法。

1.eclipse maven操作右击Run as 都能看到,如图所示

2.maven clean 操作主要目的是清除target目录下以前编译生成的文件及jar包

3.右击-->Run as --> maven build 会弹出一个框,输入compile或install命令都可以,编译项目。通过run 执行命令

4.可能会出现如下错误:

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

5.错误原因是maven编译的需要JDK而不是JRE。

eclipse 导航栏中 【Window】-->【Prefrences】-->【Java】-->【Installed JREs】

6.上一步出现的框里点击添加--->【Standard VM】---> 选择JDK的安装目录确定。

7.添加JDK路径以后必须把JDK把前面的框 勾上,否则还会出现错误。

8.再次执行compile 或者 install 指令,编译成功。

原文:https://jingyan.baidu.com/article/6dad5075250734a123e36efa.html

 

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依赖包的本... 阅读详情

相关推荐

Maven 3.6+ 报错 No goals specified:3种主流IDE配置差异与修复方案

本文深入解析Maven 3.6+报错No goals specified的根本原因,对比IntelliJ IDEA、Eclipse和VS Code三大主流IDE的Maven集成机制差异,并提供针对性的修复方案。通过分析lifecycle phase与goal的配置关系,帮助开发者解决跨IDE构建不一致问题,提升项目构建稳定性。

weixin_30615767的博客 407

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万+

【上海大学计算机组成原理实验报告】六、内存系统实验

学习内存访问机制//理解代码和数据的分区存放原理和技术//手动方式把立即数`33H`写入内存`D1H`单元//手动方式把`D1H`单元的内容读出,再送入`ST`单元//在`CP226`汇编语言程序集成开发环境下编写程序//既然有`ORG`微指令,为什么集成开发环境下载到实验箱的目标程序的第一条执行语句最好存放在0号地址?//上海大学计算机组成原理实验//内存系统实验

HackerKevon的博客 3096

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万+

关于Maven项目build时出现No compiler is provided in this environment的解决方法

这几天在学习maven,遇到一个问题好久才解决。就是在编译Maven项目时出现 [ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than aJDK? ...

chukun4948的博客 709

maven No compiler is provided environment

下面介绍eclipse maven操作正常出现的No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK? 错误的解决办法。 方法/步骤 eclipse maven操作右击Run as 都能看到,如图所示 步骤阅读 ...

a6596250的博客 171

Maven项目build时出现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? 解决 eclipse>preference>maven 选择Java环境为jdk路径而不是jre路径

Coding 199

No compiler is provided in this environment. Perhaps ....

##Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile 办法:Installed JREs,使用本机的JDK。 ##No compiler is provided in this environment. Perhaps you are running on a JRE rather...

金溪的博客 420

maven打包## Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.3:compile 完整的错误信息:

Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.3:compile 完整的错误信息: 原文 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.3:compile (default-compile...

weixin_43560924的博客 632

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

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

msf后渗透之获取登入password、远程控制、调用摄像头

在terminal输入load kili creds_all直接获取密码(不一定成功) 使用kiwi_cmd sekurlsa::logonpasswords获取密码

m0_61506558的博客 2941

金属与石材幕墙工程技术规范-JGJ133-2013.pdf

金属与石材幕墙工程技术规范-JGJ133-2013.pdf

上一篇: 运行 mvn compile 报错[INFO] BUILD FAILURE,解决方法
下一篇: SpringMvc三层架构注解详解@Controller、@Service和@Repository
cherry_vincent
博客等级 码龄12年 114粉丝 62原创
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值