1 Problem description
The environment OpenJDK 11
+ Gradle
, and the dependency of build.gradle
is directly introduced into druid
, and the error is as follows:
'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.2.6
'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.2.6
2 Reason analysis
The specific reason can be found in issue , in fact, it is not compatible with JDK11
:
Since there is no problem with running, then manually solve the compilation problem.
3 problem solving
According to the error prompt of IDEA
(specifically varies with the druid
version):
~/.gradle/caches/modules-2/files-2.1/com.alibaba/druid/1.2.6/c57198d77a31adf5bd36d35f9b12dc936b732587/druid-1.2.6.pom
Modify the pom
file in the prompt:
Just comment out the above two packages. In druid
of the 1.2.6
version, modify line 703 of the pom
file and add a comment:
Re-import the dependencies again and you can see that there is no problem:
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。