I'm writing documentation for my java file. In that documentation, I want to add some html links at the end of each generated file. For that, what I have to use while writing java documentation?
-
You are seriously manually creating javadoc pages? – Stultuske Sep 21 '15 at 07:11
-
no, I am generating with java doc tool – Lakshmi Prasanna Sep 21 '15 at 07:12
-
@Stultuske Why not ??? everyone must create doc for their source code. No ? – Suresh Atta Sep 21 '15 at 07:13
-
Hey I am writing java doc for my Java file, Finally I am creating doc file with java doc tool not with command prompt. – Lakshmi Prasanna Sep 21 '15 at 07:15
-
@LakshmiPrasanna Who told you are are creating with command prompt here ? – Suresh Atta Sep 21 '15 at 07:16
-
@sᴜʀᴇsʜᴀᴛᴛᴀ Do you know the answer for the question I've asked? – Lakshmi Prasanna Sep 21 '15 at 07:19
-
@LakshmiPrasanna http://stackoverflow.com/questions/5915992/javadoc-writing-links-to-methods – Suresh Atta Sep 21 '15 at 07:22
-
@sᴜʀᴇsʜᴀᴛᴛᴀ : must, no. should, yes. depending on how communication is done internally in an organization. But generating javadoc and manually creating it are entirely different things. – Stultuske Sep 21 '15 at 07:27
-
@LakshmiPrasanna: why exactly do you need to add 'copyright' information in there? it's not really relevant technical information, which is what JavaDoc should provide – Stultuske Sep 21 '15 at 07:27
-
@Stultuske Actually I want to provide one html link at the bottom of my java file. – Lakshmi Prasanna Sep 21 '15 at 07:29
-
@Stultuske Well, the [Standard Library API doc](http://docs.oracle.com/javase/8/docs/api/) includes a copyright mention at the bottom... – eruve Sep 22 '15 at 10:03
-
@eruve: the Standard library api is open on the net, visible for all and everyone to see/use. Personally, I have never worked for a company that puts its documentation on an open network for all to see. – Stultuske Sep 22 '15 at 10:27
-
@Stultuske I don't think the OP asked a *philosophical* question, though. Regardless of conjectures, she did ask a valid, technical question. – eruve Sep 22 '15 at 10:52
-
Sure, but the editors are built to provide technical info, not copyright info. It is possible to add additional info, but there's no fixed way to add copyright information as such. https://community.oracle.com/thread/1523173 – Stultuske Sep 22 '15 at 11:01
2 Answers
If you are using Eclipse as IDE, you can use the plugin JAutodoc: http://jautodoc.sourceforge.net/
To add a default text at the beggining of each text file.

- 704
- 5
- 17
-
Thank u. I know that, but do you know How to add a html link at the end of each file – Lakshmi Prasanna Sep 21 '15 at 07:18
-
-
can you provide me an example for that. Why because I've tried that, bt it doesn't work for me – Lakshmi Prasanna Sep 21 '15 at 07:24
According to the javadoc manual (can't find a newer version right now), you should use -footer
when you generate your java API documentation from the CLI, for instance:
javadoc -footer "<b>Copyright 2015 Lakshmi Prasanna</b><br>" com.mypackage
Here's a similar example, but that uses -header
instead.
Now, if you use a good IDE, at the very least it should allow you to type that somewhere in the project settings. Back in the day Eclipse wasn't very flexible, so I had to make an Ant script (yuck).
EDIT:
One limitation with this approach is that the CLI -option
s depend on the tool. This works with the standard javadoc
command but might not work with another vendor's doclet. However I'm not sure there's a universal way to achieve what the OP asked.
Anyway, it seems to be: NOT -footer
but -bottom
.

- 661
- 5
- 12