Asciidoclet fails with "invalid flag error" on Java 10
See original GitHub issueWhen I try to run the current Asciidoclet 1.5.5-SNAPSHOT with Java 10 via the Gradle javadoc task I get the following error:
javadoc: error - invalid flag: -d
This is because the old “Standard Doclet” was removed in Java 10 (http://www.oracle.com/technetwork/java/javase/10-relnote-issues-4108729.html#JDK-8177511) and Asciidoclet runs as a preprocessor that in-turn calls the Standard Doclet.
I’m not sure if this is worth trying to fix separately from Issue #71. In other words there are two approaches to resolving this:
- Create an Asciidoclet that implements the new JavaDoc API and have this new Asciidoclet call the new standard doclet for generating HTML. i.e. Issue #71
- Update the current Asciidoclet to use the new Standard Doclet w/o Asciidoclet itself implementing the new JavaDoc API. (I don’t even know if this is possible)
So, it seems to me like #71 is probably the best solution. But there may be other solutions and we need to track this specific issue that we are seeing under Java 10+.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Gradle with javadoc doclet : error - invalid flag - Stack Overflow
Yeah, no problem. I think it will have to do with something from the javadoc version(I mean, if there is no "doctitle" flag,...
Read more >Turning off doclint in JDK 8 Javadoc - Stephen Colebourne's blog
With Java, we were fortunate to have the Javadoc toolset built in and easy to access from ... javadoc: error - invalid flag:...
Read more >old standard doclet (Standard.java) option flags gives error in ...
This means that all option flags will fail. In addition, it will throw an invalid flag error when this is clearly not what...
Read more >JDK-4935349 Get error message "invalid flag: -d" when add ... - Bug ID
But when adding the parameters "-doclet" and "-docletpath" to the javadoc call, the following error occurs: javadoc: invalid flag: -d usage: javadoc ...
Read more >Asciidoctor User Manual
Asciidoctor also has a Java API that mirrors the Ruby API. ... For example, in the Asciidoclet project (AsciiDoc in Javadoc), ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Agreed, we should just move to the new API as you state in option 1 - option 2 is working in the wrong direction.
I’m also running into this on Java 11. Specifically I’m seeing that the
-authorflag is invalid.