javax.xml.validation.SchemaFactory
javax.xml.transform.sax.SAXTransformerFactory
javax.xml.stream.XMLEventFactory
javax.xml.stream.XMLInputFactory
javax.xml.stream.XMLOutputFactory
javax.xml.xpath.XPathFactory
javax.xml.parsers.DocumentBuilderFactory
javax.xml.parsers.SAXParserFactory
all have a getInstance() method that returns the internal implementation but only if the associated System property or META-INF/services does not exist.
The only way to guarantee that the internal implementation is used is to explicitly name the class of the internal implementation.
With JDK9, those are all internal JDK classes that require an export to access. There should be an alternative way to specify the internal class.
For example, there could be some token string like "default" to gets this class explicitly.
javax.xml.transform.sax.SAXTransformerFactory
javax.xml.stream.XMLEventFactory
javax.xml.stream.XMLInputFactory
javax.xml.stream.XMLOutputFactory
javax.xml.xpath.XPathFactory
javax.xml.parsers.DocumentBuilderFactory
javax.xml.parsers.SAXParserFactory
all have a getInstance() method that returns the internal implementation but only if the associated System property or META-INF/services does not exist.
The only way to guarantee that the internal implementation is used is to explicitly name the class of the internal implementation.
With JDK9, those are all internal JDK classes that require an export to access. There should be an alternative way to specify the internal class.
For example, there could be some token string like "default" to gets this class explicitly.