在编译SSM项目时,碰到如下问题,希望能给遇到相同问题的小伙伴们帮助 O(∩_∩)O~

Eclipse导入Maven项目后,选中父项目,执行Run AS——>Maven install后,出现如下错误:

说的是执行编译失败,你是不是在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的目录).

配置好之后,选中项目,refresh(或F5)下,重新执行Maven install.本来以为就可以了,还是部分子模块还是报之前的错误。

分析了一下,Maven项目,多模块相互依赖,简单的F5还是不行的,直接Update Maven Project,记得勾选Force Update。

然后在执行Maven install后,这次可以执行成功了。

Maven构建项目报No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK? 问题的解决方案的更多相关文章

  1. 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? 你应该 ...

  2. maven打包错误:No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?

    [INFO] Scanning for projects...[INFO]                                                                ...

  3. Maven错误:[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?的解决方法

    错误: [ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather tha ...

  4. 【maven】maven的web项目打包报错: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 ...

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

  6. maven install 报错 No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?

    1.控制台打印信息 [INFO] Scanning for projects... [INFO] [INFO] ---------------------< org.cqupt.mauger:R ...

  7. maven启动报错No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?

    [INFO] Scanning for projects... [WARNING] [WARNING] Some problems were encountered while building th ...

  8. Maven 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 ...

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

    maven install项目时出错,提示信息如下: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-pl ...

随机推荐

  1. Winform截图小程序

    今天闲时做的一个Demo,做得并不好,只是实现了最基本的截图功能 主要的思路就是 先打开一个主窗体,点击"截图按钮" 会出现一个半透明的小窗体(可以拉伸放大缩小) 然后利用Grap ...

  2. django中的验证码

    from django.shortcuts import renderfrom PIL import Imagefrom PIL import ImageDrawfrom PIL import Ima ...

  3. Eclipse 反编译之 JadClipse

    一:下载对应的 net.sf.jadclipse_x.x.x.jar ,把该jar包放入到Eclipse中的 plugins 目录下,下载地址:https://sourceforge.net/proj ...

  4. spring data jpa(一)

    第1章     Spring Data JPA的快速入门 1.1   需求说明 Spring Data JPA完成客户的基本CRUD操作 1.2   搭建Spring Data JPA的开发环境 1. ...

  5. spring AOP为什么配置了没有效果?

     spring Aop的配置一定要配置在springmvc配置文件中         springMVC.xml 1 <!-- AOP 注解方式 :定义Aspect --> <!-- ...

  6. 阿里巴巴的数据池DRUID

      使用了阿里巴巴的数据池管理: 监控DB池连接和SQL的执行情况 https://github.com/alibaba/druid/wiki/常见问题 https://www.cnblogs.com ...

  7. VS2012 常用配置

    一. 整合svn版本控制 1. 点击此 下载与SVN版本相对应的ankhsvn插件,本人用的是Subversion 1.8 2. 安装ankhsvn插件,打开VS2012,右键任一工程,有显示如下图, ...

  8. 简单Json序列化和反序列化

    序列化是什么: 序列化就是将一个对象的状态(各个属性量)保存起来,然后在适当的时候再获得.序列化分为两大部分:序列化和反序列化.序列化是这个过程的第一部分,将数据分解成字节流,以便存储在文件中或在网络 ...

  9. Django框架model实现数据库增删查改

    1.创建Django工程 https://www.cnblogs.com/CK85/p/10159159.html 2.在model.py中配置生成表格的类对象. from django.db imp ...

  10. RabbitMq、ActiveMq、ZeroMq、kafka各个消息中间件之间的区别

    MQ框架非常之多,比较流行的有RabbitMq.ActiveMq.ZeroMq.kafka.这几种MQ到底应该选择哪个?要根据自己项目的业务场景和需求. 第一部分:RabbitMQ,ActiveMq, ...