maven打包报错 Fatal error compiling: tools.jar not found: C:\Program Files\Java\jre1.8.0_151\..\lib\tool
maven 打包报错 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile (default-compile) on project demo-web: Fatal error compiling: tools.jar not found: C:\Program Files\Java\jre1.8.0_151\..\lib\tools.jar -> [Help 1]
报错详细内容
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building demo-web 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for com.auto.demo:demo-common:jar:0.0.1-SNAPSHOT is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] The POM for com.auto.demo:demo-thirdparty-interface:jar:0.0.1-SNAPSHOT is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] The POM for org.apache.james:apache-mime4j:jar:0.6 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ demo-web ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 45 resources
[INFO] skip non existing resourceDirectory F:\workspace-autojin\demo\demo-web\src\main\resources\development
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @ demo-web ---
[INFO] Compiling 142 source files to F:\workspace-autojin\demo\demo-web\src\main\webapp\WEB-INF\classes
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.055 s
[INFO] Finished at: 2019-03-18T15:05:22+08:00
[INFO] Final Memory: 13M/309M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile (default-compile) on project demo-web: Fatal error compiling: tools.jar not found: C:\Program Files\Java\jre1.8.0_151\..\lib\tools.jar -> [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/MojoExecutionException
解决办法:
Window => Preferences => Java => Installed JREs
选中 jre ,点击 Edit... 进行编辑
将 C:\Program Files\Java\jre1.8.0_151 修改为 jdk,一般 jdk 和 jre 在同一目录下
点击 Finish 即可
maven打包报错 Fatal error compiling: tools.jar not found: C:\Program Files\Java\jre1.8.0_151\..\lib\tool的更多相关文章
- Eclipse通过Maven构建时出现: Fatal error compiling: tools.jar not found: Fatal error compiling: tools.jar not found: C:\Program Files\Java\jre1.8.0_31\..\lib\tools.jar
错误: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile (default-com ...
- maven bug之Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile (default-compile) on project acSpaceCommon: Fatal error compiling: tools.jar not found: C:\Program Files\J
maven打包项目的时候一直报这个异常 一般的解决办法我都试过 在pom.xml加代码 也不行 只有10分了 求大神解答 这是因为测试代码时遇到错误,它会停止编译.只需要在pom.xml的< ...
- maven 启动 报错 Fatal error compiling: 无效的目标发行版
http://news.tuxi.com.cn/news/119999990123162/31622105.html http://lyking2001.iteye.com/blog/837440 针 ...
- Maven deploy时报Fatal error compiling: tools.jar not found错误的问题处理
摘自:http://blog.csdn.net/achilles12345/article/details/19046061 在Eclipse环境下,使用Maven进行deploy时发现报了该错误:F ...
- fatal error compiling: tools.jar not found
在Eclipse中使用Maven提供的Install(打包)命令插件的时候报错[Fatal error compiling: tools.jar not found]. 报错的原因 报错的原因从错误信 ...
- 【Java】移动JDK路径后,修改环境变量不生效 Error: could not open `C:\Program Files\Java\jre1.8.0_131\lib\amd64\jvm.cfg'
场景: JDK原先装在C盘的,现在移动到了D盘,并在环境变量修改了%JAVA_HOME%的新路径,但是CMD中输入java后依然报错. Error: could not open `C:\Progra ...
- Maven打包 报 Unable to locate the Javac Compiler in: C:\Program Files\Java\jre1.8.0_73\..\lib\tools.jar
无法找到javac 编译环境 右键项目 --> properties -->Java Build Path -->选中JRE 点击右侧 Edit 编辑 --> 把你设置的JRE ...
- win10下JDK安装,配置环境变量后报Error: could not open `C:\Program Files\Java\jre1.8.0_112\lib\amd64\jvm.cfg'
把Path里面的%JAVA_HOME%/bin放在最前面.
- maven 打包报错
[INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------ ...
随机推荐
- linux vi(vim)常用命令汇总(转)
前言 首先解析一个vim vi是unix/linux下极为普遍的一种文本编辑器,大部分机器上都有vi的各种变种,在不同的机器上常用不同的变种软件,其中vim比较好用也用的比较广泛.vim是Vi Imp ...
- OC-代理,字符串
总结 编号 标题 内容 一 protocol protocol 基本概念/语法格式/protocol和继承区别/使用注意/基协议/@required和@optional关键字/类型限制 二 代理设计模 ...
- Element-ui 中对表单进行验证
Element-ui 中对表单(Form)绑定的对象中的对象属性进行校验 如果是直接绑定属性,是可以的,但是绑定对象中的属性就需要特别处理,需要在rules中添加双引号 " "或者 ...
- 【科研】科研【合同】盖章流程/横向·非涉密/电子科技大学
[前置手续] 一.在科研管理系统里填单子,立项. 二.科研管理系统审核通过后,对于对面给好的合同,在合同系统里选择[合同业务发起-发起非标准合同],填单子. 三.会有一系列的审核,审核完成后打印合同备 ...
- SVM中的软间隔最大化与硬间隔最大化
参考文献:https://blog.csdn.net/Dominic_S/article/details/83002153 1.硬间隔最大化 对于以上的KKT条件可以看出,对于任意的训练样本总有ai= ...
- [云原生]Docker - 容器
目录 Docker容器 启动容器 新建并启动 启动已终止容器 守护态运行容器 终止容器 进入容器 attach命令 exec命令 导出和导入容器 导出容器 导入容器 删除容器 Docker容器 容器是 ...
- drone使用git tag作为镜像tag
官方自动tag plugin/docker 已支持自动标签,使用方法如下 steps: - name: docker image: plugins/docker settings: repo: foo ...
- Mysql实例 数据库优化
目录 一.前言 二.数据库表设计 三.数据库结构设计 四.数据库性能优化 硬件配置选择 数据库配置优化 系统配置优化 数据库安全优化 五.数据库架构扩展 增加缓存 主从复制与读写分离 分库 分表 分区 ...
- react的diff算法与antd中switch组件不更新问题
问题描述: 现在有个需求,现有一个列表table,里面的数据有启用的也有关闭的,switch组件会根据数据状态展示,同时进行排序,启用数据在前面,未启用的在后面.如图 然后现在需要操作,假如我将第四条 ...
- 深刨显式锁ReentrantLock原理及其与内置锁的区别,以及读写锁ReentrantReadWriteLock使用场景
13.显示锁 在Java5.0之前,在协调对共享对象的访问时可以使用的机制只有synchronized和volatile.Java5.0增加了一种新的机制:ReentrantLock.与之前提到过的机 ...