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的更多相关文章

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

  2. 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的< ...

  3. maven 启动 报错 Fatal error compiling: 无效的目标发行版

    http://news.tuxi.com.cn/news/119999990123162/31622105.html http://lyking2001.iteye.com/blog/837440 针 ...

  4. Maven deploy时报Fatal error compiling: tools.jar not found错误的问题处理

    摘自:http://blog.csdn.net/achilles12345/article/details/19046061 在Eclipse环境下,使用Maven进行deploy时发现报了该错误:F ...

  5. fatal error compiling: tools.jar not found

    在Eclipse中使用Maven提供的Install(打包)命令插件的时候报错[Fatal error compiling: tools.jar not found]. 报错的原因 报错的原因从错误信 ...

  6. 【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 ...

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

  8. win10下JDK安装,配置环境变量后报Error: could not open `C:\Program Files\Java\jre1.8.0_112\lib\amd64\jvm.cfg'

    把Path里面的%JAVA_HOME%/bin放在最前面.

  9. maven 打包报错

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

随机推荐

  1. linux vi(vim)常用命令汇总(转)

    前言 首先解析一个vim vi是unix/linux下极为普遍的一种文本编辑器,大部分机器上都有vi的各种变种,在不同的机器上常用不同的变种软件,其中vim比较好用也用的比较广泛.vim是Vi Imp ...

  2. docker配置国内阿里云镜像源

    使用docker默认镜像源下载镜像会很慢,因此很多情况下,我们在安装完docker以后都会修改为国内的镜像,这样在下载镜像的时候就不用等那么长时间了. 配置docker的镜像为阿里云镜像 方法一 $ ...

  3. 【Java多线程】CompletionService

    什么是CompletionService? 当我们使用ExecutorService启动多个Callable时,每个Callable返回一个Future,而当我们执行Future的get方法获取结果时 ...

  4. Spring Batch Event Listeners

    Learn to create and configure Spring batch's JobExecutionListener (before and after job), StepExecut ...

  5. 【划重点】Python pandas简介

    一.pandas获取Excel表单的两种方式 import pandas as pd df1 = pd.DataFrame(pd.read_excel(r'C:\Users\ASUS\Desktop\ ...

  6. 实现input表单从右向左输入

    <input style="text-align:right"></input>

  7. [BUUCTF]PWN——pwnable_start

    pwnable_start 附件 步骤: 例行检查,32位程序,什么保护都没开,首先想到的是ret2shellcode的方法 本地试运行一下,看看程序大概的情况 32位ida载入,没法f5,好在汇编不 ...

  8. [BUUCTF]REVERSE——Youngter-drive

    Youngter-drive 附件 步骤: 例行查壳儿,32位程序,upx壳儿 利用网上找的upx脱壳儿工具脱完壳扔进ida,首先检索程序里的字符串,发现了有关flag的字样,跟进,当source=T ...

  9. Table.SplitColumn拆分…Split…(Power Query 之 M 语言)

    数据源: 一列若干行数据. 目标: 根据特定条件拆分 操作过程: 选取"品名"列>[主页](或[转换])>[拆分列] 选取"品名"列>[主页] ...

  10. sqlalchemy-orm学生签到 成绩记录查询系统

    #!/usr/bin/env python # Author:zhangmingda '''''' from sqlalchemy import create_engine,ForeignKey,DA ...