JDK9 approach to limiting package to one module

Alan Bateman Alan.Bateman at oracle.com
Thu Mar 30 07:35:55 UTC 2017

On 30/03/2017 03:41, Stephen Felts wrote:

> We ran into a problem today caused by the JDK 9 single-module package limitation.
> We have an Apache jar file that references org.w3c.dom.ls.DocumentLS that is in another jar on the classpath. However, the incomplete org.w3c.dom.ls package is also in the JDK so the JDK wins and we get a class definition not found.
> This works on JDK 8 but not JDK 9.
> The only way to get around this without using a patch jar (I assume that might work) is to repackage org.w3c.dom in our jar files.
> Is there another solution?   Can we get a complete package added to the JDK?
org.w3c.dom was one of the Endorsed Standards APIs in Java SE 8 and 
older and so was upgradeable via the endorsed standards override 
mechanism. It was never upgradeable via the class path.

As regards DocumentLS then I think this needs someone familiar with this 
API to comment. I checked the Java Language Bindings for the DOM L3 Load 
and Save spec but I don't see it. I do see drafts from 2002/2003 that 
reference it, is it possible that this interface didn't make the final 


More information about the jigsaw-dev mailing list