The package org.w3c.dom is accessible from more than one module: , java.xml

前端 未结 7 1113
野性不改
野性不改 2021-01-03 19:37

I am unable to import org.w3c.dom.NodeList package to Eclipse. It is showing

The package org.w3c.dom is accessible from more than one mo

7条回答
  •  醉酒成梦
    2021-01-03 20:04

    Disappointingly I don't see any compiler flags to show what jar the problem is with Even -Xlint:module doesn't seem to show up anything useful and eclipse doesn't shed any light on the issue

    Instead to find where org.w3c.dom comes from I've been using this script:

    mvn dependency:copy-dependencies -DincludeScope=test -DoutputDirectory=deps
    for i in deps/*.jar; do if unzip -l $i| grep -q org.w3c.dom; then echo $i; fi ; done
    

    Strictly you don't have to specify the scope test as that's the default but I've included it as you might want to use compile instead

提交回复
热议问题