snapshot of javadoc style comments

CS230 Lab 6

Javadoc generation steps

Here are the steps taken to create the .html documentation files for these code files. From your lab6 folder, try this:
javadoc Card.java -d doc
Repeat that again for Deck.java. Then look inside the doc folder. In order to view Card.html in a browser, we need to make it publicly accessible. One way to do this is to copy the entire doc folder into your public_html folder. Navigate to your public_html folder, create a doc folder, cd into the (newly created) doc folder and then copy the contents of your labs/lab6/doc folder into it.

Here is a diagram that illustrates what we are doing. The javadoc HTML pages are initially generated in our lab6 folder. Our goal is to copy that entire doc folder into the public_html folder (which automatically exists in your account) so that they can be viewed in a browser. Note that the commands below work only if your account is set up like the diagram (i.e. a labs folder, with a lab6 folder within that, and no cs230 folder).

The comments are in red.

cd                (navigate to your home directory)
cd public_html    (go to your public_html directory)
mkdir doc         (make a doc folder)
cd doc            (change current folder to be doc folder)
cp -R ../../labs/lab6/doc/* .         (copy the javadoc files to the public doc folder)
Now we need to fix the permissions on the files to make them viewable online. From inside your doc folder, you need to make the individual files viewable:
chmod 644 *.*
From your public_html folder, this makes the doc folder viewable:
cd ..            (move up one directory from doc to public_html)
chmod 755 doc
Now, try viewing the Javadoc documents from the browser. Your URL will be something like this:
http://cs.wellesley.edu/~slee/doc
where you replace the slee with your username. Note the tilde (~) before the user name. That specifies that the public_html directory be accessed.

Useful links