tags:

views:

24

answers:

1
+1  Q: 

javadoc @docRoot

Can anyone show me an example of that javadoc tag?

I don't understand very well how to use it in the code

+2  A: 

The javadoc documentation has a couple good examples. It always points to the root of the documentation, so if there's something you want to include on every page, you use it to find the javadoc root, since a relative path would be different from page to page

For example, to include your company's logo at the top of every generated documentation page, you might put logo.png in the root of the documentation and then add:

<img src="{@docRoot}/logo.png">

to the javadoc header

Michael Mrozek
so is it not used into the source code? what do you mean for javadoc header?
xdevel2000
@xdevel, to build off of Michael's example, you can think of `@docRoot` as being conceptually similar to HTML's `<base>` tag.
Lord Torgamus
@xdevel2000 The Javadoc tool supports adding something to the header of every page by passing it the `-header` flag, so you could do `javadoc -header '<img src="{@docRoot}/logo.png">'`
Michael Mrozek