Created attachment 35953 [details] Tarball of sample project which demonstates the described behavior. JDK 9 introduced a new set of module-aware switches for the javadoc tool. The ant <javadoc> task does not support these switches, not even as nested <arg> elements. I can get ant to build javadoc by using the <exec> task. I will attach a tarball of source code for a sample project which demonstrates this behavior. The "javadoc" target uses the <exec> task and it succeeds. The "javadoc2" target uses the <javadoc> task and it fails.
I see --module and --module-source-path, but javadoc in Java 9+ adds a bunch of module-related switches, like --add-modules, --add-exports, --add-reads, --limit-modules, --module-path, --show-module-contents, --show-packages, --system, --upgrade-module-path Of those, --add-exports and --add-reads are not printed by --help, but are documented in Javadoc Guide [1] For completeness sake, there are three more new switches: --show-members, --show-types, and --release apart from HTML version switches mentioned in [2] [1] https://docs.oracle.com/javase/9/javadoc/JSJAV.pdf [2] https://bz.apache.org/bugzilla/show_bug.cgi?id=62441
1.10.6 and 1.9.14 add support for --module --module-path and --module-source-path. --module is the only one that really is required so that the task knows you are actually specifying "things to document".
*** Bug 62776 has been marked as a duplicate of this bug. ***