Wrap Up - javadoc Documentation
In our penultimate lesson of the case study we create documentation for the case study by running the
javadoc tool on the packages we have coded. This will extract the HTML style comments we have written in the source files and produce a top level folder and subfolders for the packages.
javadoc tool comes with a lot of options as you can see from the following screenshot. You can explore the various options at your leisure but we will just be using the
-d option to create our documentation.
As our code is separated into different packages we can create javadocs at the package level.
Change to directory cd D:\ManufacturerApplication\src or wherever your source code for the
ManufacturerApplication project is.
javadoc tool using the
-d option javadoc -d ..\javadoc client model remoteservices services
The following screenshot shows the results of running the
javadoc tool on our source packages and the files and directories created.
This screenshot shows the files and directories created in the
Exploring Our API Documentation
Change to directory cd D:\ManufacturerApplication\javadoc or wherever you generated the javadoc for the
The following screenshot is after typing index.html from the command prompt and the resultant HTML displayed in Chrome on my Windows 10 machine. The
documentation produced should be familiar in style as it matches that produced for the offical API documentation. Although using
javadoc has an initial effort by the end of the project
we have a documented API for others to use in the future. Well worth the effort and a good practice to get into.
We wrap up the Java case study and our code!