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.

Getting "javadoc: error - invalid flag: -html4" when trying to build

See original GitHub issue

What version of gRPC-Java are you using?

I am on master branch. git status gives this

On branch master
Your branch is up to date with 'origin/master'.

What is your environment?

I am using ubuntu 18.04

openjdk 11.0.9.1 2020-11-04
OpenJDK Runtime Environment (build 11.0.9.1+1-Ubuntu-0ubuntu1.18.04)
OpenJDK 64-Bit Server VM (build 11.0.9.1+1-Ubuntu-0ubuntu1.18.04, mixed mode, sharing)

Gradle

------------------------------------------------------------
Gradle 5.6.2
------------------------------------------------------------

Build time:   2019-09-05 16:13:54 UTC
Revision:     55a5e53d855db8fc7b0e494412fc624051a8e781

Kotlin:       1.3.41
Groovy:       2.5.4
Ant:          Apache Ant(TM) version 1.9.14 compiled on March 12 2019
JVM:          11.0.9.1 (Ubuntu 11.0.9.1+1-Ubuntu-0ubuntu1.18.04)
OS:           Linux 4.15.0-123-generic amd64

What did you expect to see?

I was following steps in building grpc-java, with all prerequisites (including protobuf) and expected a successful build using gradle.

What did you see instead?

While trying to ./gradlew build with skip android in gradle.properties I got error

javadoc: error - invalid flag: -html4

Steps to reproduce the bug

Just run ./gradlew build

How did I fix it

I commented out line 282 in build.gradle

if (JavaVersion.current().isJava10Compatible()) {
        allprojects {
            tasks.withType(Javadoc) {
=======>>>   //options.addBooleanOption('html4', true)
            }
        }
    }

I know this is not the ideal way to do this. Can anyone provide more information on this? Thanks!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
dapengzhang0commented, Nov 23, 2020

Fixed by #7645. Thank you @amnox

1reaction
dapengzhang0commented, Nov 18, 2020

I tried to change that option to html5 aswell but got same error.

Then seems both options are removed in newer jdk. So we might as well remove line 282 in build.gradle and we don’t care too much about java 10 because it is not a long term supported version.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Intellij how to fix "javadoc: error - invalid flag: --source-path"
Whenever I try to generate a JavaDoc in Intellij (Tools -> Generate JavaDoc), leave the settings on default (output directory is my ...
Read more >
Javadoc Command - Oracle Help Center
The javadoc command searches all subdirectories of the specified paths. If you omit -sourcepath , then the javadoc command uses -classpath to find...
Read more >
Turning off doclint in JDK 8 Javadoc - Stephen Colebourne's blog
With JDK 8, you are unable to get Javadoc unless your tool meets the standards of doclint. ... javadoc: error - invalid flag:...
Read more >
23693 – javadoc task with doclet: "javadoc: invalid flag: -d"
Now, i try to use a custom doclet and added the following lines to my javadoc task: doclet="de.pt.MyDoclet" docletpath="${basedir}/prg/java/bin/ ...
Read more >
Writing Javadoc Checks - Checkstyle
Checkstyle supports HTML4 tags in Javadoc comments: all HTML4 elements . HTML4 is picked just to have a list of elements whose end...
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