首页 > 编程语言 > 详细

You need to run build with JDK or have tools.jar问题解决

时间:2018-11-07 17:35:30      阅读:1986      评论:0      收藏:0      [点我收藏+]

一、导入Maven项目后,pom文件提示信息

You need to run build with JDK or have tools.jar on the classpath.If this occures during eclipse build make sure you run eclipse under JDK as well 
(com.mysema.maven:apt-maven-plugin:1.1.3:process:default:generate-sources)
  1. 检查JDK安装是否正确,CMD窗口,java -version可以看到版本信息,正确
  2. 检查STS配置的JDK路径,确认无误
  3. eclipse是在eclipse.ini文件(STS是在STS.ini文件)新增jdk的javaw.exe配置
    -vm
    D:/Program Files/Java/jdk1.8.0_171/bin/javaw.exe
    -startup
    plugins/org.eclipse.equinox.launcher_1.5.0.v20180512-1130.jar
    --launcher.library
    plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.700.v20180518-1200
    -product
    org.springsource.sts.ide
    --launcher.defaultAction
    openFile
    -vmargs
    -Dosgi.requiredJavaVersion=1.8
    --add-modules=ALL-SYSTEM
    -Xms40m
    -Dosgi.module.lock.timeout=10
    -Dorg.eclipse.swt.browser.IEVersion=10001
    -Xmx1200m
    -javaagent:D:\spring-tool-suite\sts-bundle\sts-3.9.5.RELEASE\lombok.jar

     

  4. 重启eclipse或者STS,亲测可用

 

You need to run build with JDK or have tools.jar问题解决

原文:https://www.cnblogs.com/yangjiming/p/9923821.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!