When using JDK 11, Eclipse 2019-03 and jaxb-api (version 2.4, latest available in maven repository), Java Editor in Eclipse highlights the line:
import javax.xml.XMLConstants;
as an error:
The package javax.xml is accessible from more than one module: unnamed, java.xml
But the code compiles and no errors are displayed in Problems tab. Removing jaxb-api dependency makes the error go away. jaxb-api in this project is on the classpath and contains the following packages:
javax.xml.bind;
javax.xml.bind.annotation;
javax.xml.bind.annotation.adapters;
javax.xml.bind.attachment;
javax.xml.bind.helpers;
javax.xml.bind.util;
Is it a bug in Eclipse or a problem in the dependency/project?