国内知名
计算机技术平台

Druid1.1.21在JDK11下编译报错解决方案

问题

报错如图所示:

Druid1.1.21再JDK11下编译报错图

Errors occurred while build effective model from D:\installsoft\gradle-repository\caches\modules-2\files-2.1\com.alibaba\druid\1.1.21\d0972638d4f2620717ad3adc1524f65dd3eb9fc\druid-1.1.21.pom:
'dependencies.dependency.systemPath' for com.sun:tools:jar must specify an absolute path but is ${project.basedir}/lib/openjdk-1.8-tools.jar in com.alibaba:druid:1.1.21
'dependencies.dependency.systemPath' for com.sun:jconsole:jar must specify an absolute path but is ${project.basedir}/lib/openjdk-1.8-jconsole.jar in com.alibaba:druid:1.1.21
'dependencies.dependency.systemPath' for com.alibaba:jconsole:jar must specify an absolute path but is ${env.JAVA_HOME}/lib/jconsole.jar in com.alibaba:druid:1.1.21
'dependencies.dependency.systemPath' for com.alibaba:tools:jar must specify an absolute path but is ${env.JAVA_HOME}/lib/tools.jar in com.alibaba:druid:1.1.21

解决方案

评论文章即可下载!

1、新建D:\jdk-common\lib目录,将下载的文件解压放在lib目录下

2、在提示的错误路径D:\installsoft\gradle-repository\caches\modules-2\files-2.1\com.alibaba\druid\1.1.21\d0972638d4f2620717ad3adc1524f65dd3eb9fc\druid-1.1.21.pom中使用绝对路径即可

打开pom.xml文件,搜索以下2个字符串

${env.JAVA_HOME}/lib/

${project.basedir}/lib/openjdk-1.8-

全部替换为D:\jdk-common\lib\

赞(2) 打赏
未经允许不得转载:东云网 » Druid1.1.21在JDK11下编译报错解决方案
分享到: 更多 (0)

评论 4

评论前必须登录!

 

  1. #4

    我也希望能够解决,困扰好长时间了

    moogy_1993年前 (2020-03-21)
  2. #3

    谢谢博主,解决了!

    wuhanjiayou3年前 (2020-03-20)
  3. #2

    在网上找了好多,但是都不能解决,试试这个

    wuhanjiayou3年前 (2020-03-20)
  4. #1

    一直有这个问题,希望在这里得到解决

    sayarasin3年前 (2020-03-17)

东云IT,与您偕行!

免责声明联系我们

觉得文章有用就打赏一下文章作者吧,么么哒~

非常感谢你的打赏,我们将继续给力更多优质内容,让我们一起创建更加美好的网络世界!

支付宝扫一扫打赏

微信扫一扫打赏