JDK9 approach to limiting package to one module

Stephen Felts stephen.felts at oracle.com
Thu Mar 30 02:41:39 UTC 2017


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?


More information about the jigsaw-dev mailing list