Distributed Systems Lab 3 - JavaDoc
Task: Documenting Java code
JavaDoc is a powerful tool to create documentation of java code. It can save you a lot work if document your code as shown in the examples below.
Open a shell and create a directory
~/mydoc
mkdir ~/mydoc
Save the file
images.tar
in the directory
~/mydoc
(e.g. move your mouse over the link and press the right mouse button and select 'save link as')
In the shell, goto the directory mydoc and unpack the images by typing
tar -xvf images.tar
This creates a directory with a lot of nice images
Save the files
A.java
and
B.java
(e.g. move your mouse over the link and press the right mouse button and select 'save link as')
Have a look at the files and see how they are documented
Activate JDK by typing
module add java
Go to the directory where you saved A and B and type
javadoc -d ~/mydoc *.java
JavaDoc produces then HTML pages looking like
this
For further details have a look
here
and
here