18

I want my javadoc to reference a dev manual that is on my intranet. I would like to know how to do this: I tried using see {@link http://json.org} but this just produced http://json.org and not a hypertext link. Let's say I wanted to point to some wiki page inside the javadoc. How can I do this? I am just trying to have link to external website. So I want something like Example as hypertext link and it points to a full URL to website.

BenMorel
  • 34,448
  • 50
  • 182
  • 322
Androider
  • 21,125
  • 36
  • 99
  • 158
  • Not a duplicate. The other question does not answer how to use `{@link }` with URLs. The answer, that it won't work, does not appear at all in the other question. – Daniel C. Sobral Nov 28 '18 at 23:01

2 Answers2

34

{@link} and {@linkplain} are specifically used to link to other javadoc.

To link to a plain web page you can simply use an HTML link:

* @see <a href="http://json.org/">The JSON site</a>
Stephen P
  • 14,422
  • 2
  • 43
  • 67
8
/**
* some text <a href="https://www.example1.com">some in text link</a>
* @see <a href="https://www.example2.com">some other link</a>
*/
public void someFunction() {}

will be displayed as

public void someFunction()

some text some in text link

See also:
some other link

Community
  • 1
  • 1
Alexander
  • 177
  • 2
  • 9