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>
      <id>JDK-1.8</id>
      <activation>
        <activeByDefault>true</activeByDefault>
        <jdk>1.8</jdk>
      </activation>
      <properties>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
        <maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>
      </properties>
    </profile>

解决方法2:

在项目的pom.xml 文件加入maven插件,<plugins>中加入jdk路径

<plugin>
                  <artifactId>maven-compiler-plugin</artifactId>
                  <version>3.1</version>
                  <configuration>
                        <fork>true</fork>
                        <executable>
                            C:\Program Files\Java\jdk1.8.0_181\bin\javac.exe(你的安装路径)
                        </executable>
                   </configuration>
       </plugin>

原文地址:https://www.cnblogs.com/wpcnblog/p/11719269.html

时间: 2024-11-06 15:00:56

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

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

[转]在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

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 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.SingleThreadedBuild