krog krog - 1 year ago 82
Java Question

Linking to using Javadoc -link option

I am trying to link into some Javadocs hosted at (specifically, PowerMock's Javadocs) using the

option. I have tried to add the URL to PowerMock's Javadocs to my
flag, but can't get Javadoc to recognize it. I am using external links to other Javadocs just fine (e.g. Guava, Java SE 7) with Gradle as my build system. I have tried the following options:


^ I have confirmed that there is a
file in this directory




All of these result in the following error (URL changed accordingly):

javadoc: warning - Error fetching URL:

Does anyone have advice on how to make this work?

As far as I can tell this is some sort of specific problem, though likely a usage issue on my end - for example I am currently using
without issue, but
doesn't work.

Answer Source

I ended up just using -linkoffline to get around this issue, which I suppose has the nice property of not needing internet connectivity at build time, though if anyone has further thoughts on how to make this work with -link I'm all ears.