I have an eclipse (Version: 2021-09 (4.21.0)) project and I am getting "The package org.w3c.dom is accessible from more than one module: unnamed>, java.xml".
The org.w3c.dom is in java.xml which is in the jre system library (openjdk-17) on the build path. The org.w3c.dom is also in the module xercesImpl-2.12.0.SP03.jar which is included in the wildfly 25 runtime library added to my build path.
I need the xerces classes from the jar for my project, but the new jdk enforces the rule that you can't have the same package names in 2 jars.
How can I fix this? Note that I don't use maven so I need a way to exclude the "org.w3c.dom" classes from either the jar or from jdk17.