Include block tags in the following order:
The @param tag is followed by the name (not data type) of the
parameter, followed by a description of the parameter. By convention, the first
noun in the description is the data type of the parameter. (Articles like "a",
"an", and "the" can precede the noun.) An exception is made for the primitive
int, where the data type is usually omitted. Additional spaces can be inserted
between the name and description so that the descriptions line up in a block.
Dashes or other punctuation should not be inserted before the description, as
the Javadoc tool inserts one dash.
Parameter names are lowercase by convention. The data type starts with a
lowercase letter to indicate an object rather than a class. The description
begins with a lowercase letter if it is a phrase (contains no verb), or an
uppercase letter if it is a sentence. End the phrase with a period only if
another phrase or sentence follows it.
This comes out as the name of the (Linux) user. To change this, create a
Launcher shortcut and type the Launcher->Command as
/home/russ/dev/eclipse/europa/eclipse -vmargs -Duser.name="Russell Bateman"
Note: “user.name” is a Java property.
To reuse an existing Javadoc blurb, create the method comment thus:
* @see package-path.class#method-name()
public void method()
For example, ...
public class AcmeClass implements Runnable
* @see java.lang.Runnable#run()
public void run()
Thread.sleep( 5000 );
catch( InterruptedException e )
System.out.println( "AcmeClass.run() exiting" );
What shows up when the Java doc for this run method is got is the doc for
the Run() of java.lang.Runnable:
When an object implementing interface Runnable is used to create a
thread, starting the thread causes the object's run method to be
called in that separately executing thread.
The general contract of the method run is that it may take any
Read my article,
JARs and Eclipse Build Path, to learn about using ant to
generate Javadoc. However, don't ever incorporate Javadoc into an Eclipse
project. Javadoc generates very stinky HTML which will cause Eclipse to issue
countless warnings. Keep your Javadoc remote to the project.
This is useful. You can put text after it or do something like:
@see com.acme.fun.FunManager.doIt( String )
This will result in a clickable link to the Javadoc for the
doIt() method (assuming it's in the same Javadoc somewhere.