SIMS 255: Lab 4

Thursday, September 25, 2003

Javadoc

Create a new project

  • Open Eclipse from the start menu > programs > software development
  • Choose File > New > Project
  • Choose Java Project, Give it a name and click finish
  • Get the java file called Frog.java: Click on the following URL, and choose to save the file when prompted. Save the file Frog.java to your desktop:

    http://www.sims.berkeley.edu/academics/courses/is255/f03/labs/lab092503/Frog.java

  • Switch to Eclipse, Right click on your newly created project folder and choose File > Import.
  • Select File System and click Next.
  • Click on Browse and then on Desktop and click ok.
  • Frog.java should now appear in the right window. Select it and click Finish.
  • Open the Frog.java file and you will see all the comments formatted to work with javadoc.

  • Set up Javadoc (You will only have to do this part the first time you use javadoc)

  • Choose Window > Preferences
  • Click on Java in the left window to expand it and then select Javadoc
  • Paste the following into the Javadoc command box: C:\Program Files\jdk\bin\javadoc.exe and click ok
  • Run Javadoc

  • Choose File > Export
  • Select Javadoc and click next
  • Select your newly created project - make sure only one project is selected.
  • Make sure that "Use Standard Doclet" is selected and that the Destination box contains: h:\eclipse\workspace\*YourProjectName*\doc and click Finish.
  • When it prompts you to save that destination as the default for that project, click yes.
  • You will see some output in your console window as the javadoc is generated.
  • Navigate to the folder on your desktop (h:\eclipse\workspace\*YourProjectName*\doc), find the file called Frog.html and open it.

  • NF JM -- last modified 9/25/03