views:

162

answers:

6

Is there any free decent program to do code documentation for java?It's hard enough to get the coding project done and then need to spend time writing documentation as well.If you know, please tell me.

+13  A: 

javadoc is the standard tool (included with the JDK) for Java source code documentation.

The standard Java API documentation has been generated with javadoc.

Jesper
+2  A: 

Well,

definitely there is javadoc. I think it is by far the most used tool for documenting java projects. Also, take into account that not only documents the methods and the classes but also you can document/create tutorials with static html pages and they'll appear in the generated documentation.

Marc
+1  A: 

Javadoc (as noted) is the standard tool for Java. However you may want to check out Doxygen, which will provide more powerful code navigation features and rendering options.

Brian Agnew
Note that javadoc is highly customizable and extensible through doclets - plug-ins for the javadoc tool. See http://java.sun.com/j2se/1.5.0/docs/guide/javadoc/doclet/overview.html
Jesper
A: 

Automatically generated documentation sucks. Why have it? it doesn't add any value.

erikkallen
@all downvoter: Please always give a reason for your downvote. It will help others. Actually I don't find this answer very helpfull for the author, but I think erikkallen is the only one who undersood the question. To me gingergeek would like to have the javadocs generated automatically not only rendered.
quosoo
You're downvoted because your answer is not helpful and isn't a useful answer to the question. Also, the computer can never automatically generate documentation, because the computer can't describe for you in a human language what a class or method is. You have to write it yourself. Many IDEs help you with adding empty javadoc blocks on classes, methods etc.
Jesper
@Jesper: So you agreed with the erikkallen answer, but you downwoted him anyway for the form of the answer and the lack of explanation. That sounds fair to me actually.
quosoo
It might not be useful for the OP who has a requirement to produce x kilograms of documentation, but it might be helpful to other people reading this thread.
erikkallen
We have a coder at work who *exclusively* uses automatically generated documentation.... I HATE seeing /** Sets the user name */ public void setUserName(... it's useless and infuriating to have the comments talk down to me without providing any helpful information.
Chris Nava
+1  A: 

All the most popular IDEs (Eclipse, NetBeans for example) would generate the javadocs for you. It would list all the parameter, thrown exceptions etc. For obvious-purpose methods like getters and setters it will also generate good enough comments (getX() "Gets x" etc.). What you'll need to do than is to complete the javadoc comments for the classes and methods that are more sophisticated than getters, setters or default constructors.

There is also plenty of plugins (for Eclipse see here) that you can use for example to generate UML diagrams to illustrate your code structure.

quosoo
A: 

For years (more than a decade) I am using TallTree's DocJet (http://www.talltree.com/) to generate technical documentation from my Java/C++ code with very satisfactory results. The tool does not require any special tags (although it understands javadoc tags); it sufficient to describe class/method/field in plain English with occasional wording such as 'return' (or any other expression with the same meaning), "parameter" or "argument" and so on.

Darko