question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Asciidoclet fails with "invalid flag error" on Java 10

See original GitHub issue

When 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:

  1. 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
  2. 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:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
johncarl81commented, Jun 10, 2018

Agreed, we should just move to the new API as you state in option 1 - option 2 is working in the wrong direction.

1reaction
chrisvestcommented, Dec 2, 2018

I’m also running into this on Java 11. Specifically I’m seeing that the -author flag is invalid.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found