Maven报错Please ensure you are using JDK 1.4 or above and not a JRE解决方法!
https://www.cnblogs.com/shihua513/p/6163682.html
在eclipse下用maven编译时,很有可能出现以下错误:
Please ensure you are using JDK 1.4 or above and
not a JRE (the com.sun.tools.javac.Main class is required).
// 请确保您使用的是JDK 1.4或以上版本
不是一个JRE(com.sun.tools.javac。主类是必需的)。//
原因:eclipse默认是使用jre作为运行环境,而maven编译需要jdk作为运行环境。
我们只要做如下更改即可。
在eclipse中打开,
window -> preferences -> Java -> installed jres,点击add->选择Standard VM,新加一个环境,设为默认环境,注意location选择为你的jdk目录。

然后再去编译你的项目,就OK了。

如果还是不行,就在你的项目上右击,build path -> configure build path,编辑JRE System Library,选择刚才新建的默认环境

再去编译即可。
Maven报错Please ensure you are using JDK 1.4 or above and not a JRE解决方法!的更多相关文章
- Maven报错Please ensure you are using JDK 1.4 or above and not a JRE
在部署Jenkins项目时,用Jenkins调用服务器上脚本时,脚本在服务器上执行没有任何问题,但是在Jenkins上调用时就报错,提示mvn应该使用全路径执行,当加入jdk,jre,maven环境变 ...
- 阿里云oss上传图片报错,The OSS Access Key Id you provided does not exist in our records.解决方法
vue项目 1.安装OSS的Node SDK npm install ali-oss --save 2.参考官方提示https://help.aliyun.com/document_detail/11 ...
- 相对路径获取项目文件 及报错 No mapping found for HTTP request with URI XXX in DispatcherServlet with name ‘springmvc’解决方法
首先一点,WebRoot目录下的文件是都可以通过浏览器输入路径,直接读取到的 例如这样: 而WebRoot下面WEB-INF是无法浏览器输入路径直接读取的. 因为是受保护的. 如果jsp读取一个图片的 ...
- mysql报错"ERROR 1206 (HY000): The total number of locks exceeds the lock table size"的解决方法
1. 问题背景 InnoDB是新版MySQL(v5.5及以后)默认的存储引擎,之前版本的默认引擎为MyISAM,因此,低于5.5版本的mysql配置文件.my.cnf中,关于InnoD ...
- MyEclipse报错 Building workspace has encountered a problem Errors occurred during the build 的2种解决方法
1: Building workspace has encountered a problem Errors occurred during the build 如果报错这个 那么有可能是jar包,报 ...
- Vue报错:Uncaught TypeError: Cannot assign to read only property’exports‘ of object’#<Object>‘的解决方法
发现问题 运行一下以前的一个Vue+webpack的 vue仿新闻网站 小项目,报错 由于自己vue学习不深入,老是这个报错,找了好久(确切的说是整整一下午^...^)才找到原因 -v- Uncau ...
- 【MySQL笔记】mysql报错"ERROR 1206 (HY000): The total number of locks exceeds the lock table size"的解决方法
step1:查看 1.1 Mysql命令行里输入"show engines:"查看innoddb数据引擎状态, 1.2 show variables "%_buffer% ...
- node.js报错throw err; // Rethrow non-MySQL errors e:\serverTest\node_modules\mysql\lib\protocol\Parser.js:79 解决方法
今天在用node+angular做后台时,需要使用session保存登陆状态的时候,遇到了此问题,问题直译为非mysql问题,我也在后台取到的登陆用户名和密码,确实不是数据库问题.最后发现在使用ses ...
- 报错:/BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit_Sim/UIKit-3512.29.5/UITableView.m:7943解决方法
环境:Xcode7.1.1 详细错误: *** Assertion failure in -[UITableView _configureCellForDisplay:forIndexPath:], ...
随机推荐
- Computer Study
2017.12.15日开始制定长期学习计划: 大二上: 目前短期计划: 1.每天一道PAT乙级(弄完PAT乙级)+校OJ(打基础). 2.先复习C++,17周后开始复习数据结构.(补任务 刚刚发 ...
- 针对Xcode 9 + iOS11 的修改,及iPhone X的适配
1,UIScrollView的automaticallyAdjustsScrollViewInsets 失效了. automaticallyAdjustsScrollViewInsets,当设置为YE ...
- topcoder srm 325 div1
problem1 link $g[i]$表示解决前$i$个的代价,那么$g[i]$是所有$g[j]+cost(j+1,i)$的最小值. import java.util.*; import java. ...
- topcoder srm 684 div1
problem1 link 首先由$P$中任意两元素的绝对值得到集合$Q$.然后枚举$Q$中的每个元素作为集合$D$中的最大值$Max$,这样就能确定最后集合$D$中的最小值要大于等于$Min=\fr ...
- Android灯光系统--通知灯深入分析【转】
本文转自:https://www.cnblogs.com/lkq1220/p/6406261.html Android灯光系统--通知灯深入分析 通知的类别 声音 振动 闪灯 APP如何发出通知灯请求 ...
- makefile如果没有符合的显式规则将会使用隐式规则
举例: 当前目录下有个Makefile和jello.c文件,其中有这样的规则jello.o:%.c %.h Makefile (静态模式规则),表明的含义为:要生成的jello.o目标依赖jello. ...
- linux内核中宏likely和unlikely到底做了些什么?
1. 先看看它们长啥样吧!(它们有两种定义,第一种是使能了程序trace功能的宏定义,第二种是普通的宏定义,咱们分析普通宏定义吧) # define likely(x) __builtin_expec ...
- Depth-first search and Breadth-first search 深度优先搜索和广度优先搜索
Depth-first search Depth-first search (DFS) is an algorithm for traversing or searching tree or grap ...
- Druid介绍2
Druid的发送数据和查询数据 Druid 开篇 - 大数据实时探索性分析平台 官网 Druid 一次海量数据实时处理的实践 使用HDFS作为Druid的deepStorage 在哪里下载druid ...
- IDEA入门级使用教程----你怎么还在用eclipse?
http://blog.csdn.net/qq_31655965/article/details/52788374