Difference of module jdk.xml.dom and module jdk.zipfs

Christian Stein sormuras at gmail.com
Thu Mar 25 14:59:40 UTC 2021


Hi,

Besides their names, contents and purposes. (-:

So, what's the difference of module jdk.xml.dom and
module jdk.zipfs in respect to their visibility(?) at
compile and run-time?

Suppose, there's a module test.base declared as:

  module test.base {
     requires jdk.xml.dom;
     requires jdk.zipfs;
  }

Compiling it with javac (from JDK 16) works like a charm.
Running it in a custom module layer fails with:

  java.lang.module.FindException:
    Module jdk.xml.dom not found, required by test.base

If I comment out the "requires jdk.xml.dom;" directive,
everything is fine. Same, if I start the test running process
with "--add-modules DEFAULT" as an argument.

Am I setting up the module layer in a wrong manner? [1]
Are there differences between system modules?
Like all = system 1 + system 2 + incubating?

I tracked my learning process here: [2]

Cheers,
Christian

[1]:
https://github.com/sormuras/bach/blob/c1b3b5734dcf749034710aac63ed86823fbf52e1/com.github.sormuras.bach/main/java/com/github/sormuras/bach/api/ProjectBuildTestSpaceAPI.java#L119-L123

[2]: https://github.com/sormuras/bach/issues/217


More information about the jigsaw-dev mailing list