Search code examples
javagradlejavadoc

javadoc task in gradle - link to oracle's javadoc instead of displaying unlinked qualified class names everywhere


In the javadoc that my project generates, every time a class from a standard java library is referenced, it inserts a not linked qualified class name.

What I want to have happen is a link being generated instead pointing to the oracle.com Java SE 8 documentation.

Example:

static String

(or it could link to the not framed version instead)

instead of

static java.lang.String


Solution

  • This is possible by appending -link http://docs.oracle.com/javase/<javaversion>/docs/api/ to the command line arguments passed to javadoc.

    Refer to the documentation of your build tool or IDE on how to do that.