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 module:
<unnamed>
, java.xml" error message in eclipse.
Please let me know how to fix this ?
Eclipse Version:
Eclipse IDE for Enterprise Java Developers.
Version: 2019-06 (4.12.0)
Build id: 20190614-1200
Java version:
java version "12.0.1" 2019-04-16
Java(TM) SE Runtime Environment (build 12.0.1+12)
Java HotSpot(TM) 64-Bit Server VM (build 12.0.1+12, mixed mode, sharing)
<unnamed>
module. Sinceorg.w3c.dom
is already used in the system library, your code and all dependencies/JARs must not use this package even without using JPMS (without having amodule-info.java
file). So, either use Java 8 or get rid of the code/dependency that contains theorg.w3c.dom
package. – howlgerorg.w3c.dom
package (as it already used in the system library). Maybe a newer version of the JAR containingorg.w3c.dom
has in newer versions its own name space for packages instead oforg.w3c.dom
so it can be used in Java 9 and higher. – howlger