CSE 461: Introduction to Computer Communication Networks, Winter 2013
  CSE Home   About Us   Search   Contact Info 
Home
Overview
Course email
Home Virtual Machines
Homework Turnin
Class GoPost Forum
Gradebook
Schedule
Hw/Project List
   

Project 1: Project Source Setup


1. Fetch and Unpack the Source

The source is at /cse/courses/cse461/13wi/461projects.jar. Fetch a copy onto your development machine and unjar it (jar xf 461projects.jar). It will produce a 461projects directory.

2. Establish an Eclipse Workspace

Eclipse probably created a default workspace for you (in a directory named workspace), and will open that one when you launch Eclipse. We want to use a different one.

Launch Eclipse. If you're asked what workspace to open, direct it to your 461projects directory. Otherwise, on the File menu, choose Switch Workspace, then Other... Browse to your 461projects directory. Close the Welcome tab, if that's what you see.

At this point you may see an empty Project Explorer pane in the upper left. If so, you need to import the CSE461 Eclipse projects. Select the File menu, then Import..., then expand General, select Existing Projects into Workspace, and hit Next. For the root directory, browse to your 461projects directory, then OK. A list of (many) projects should appear. Hit Select All and then Finish.

3. Launch the Console Apps

There is a one-time setup in Eclipse that makes future runs more convenient. The purpose is to set a command line argument telling the application where to find its configuration file. To do that, right-click on project ConsoleApps, then Debug As, then Debug Configurations. On the left of the dialog that appears, expand Java Application (if necessary) and select ConsoleStart. Choose the Arguments tab on the right, and in the Program Arguments text box type
-d ../ConfigFiles
Now click Apply, and then Debug to start the application. You should see some output in the Console window:

  • The infrastructure code first tries to locate a config file to read. There are command line switches that control its choice. The instruction above told it to look at all config files in directory ../ConfigFiles. If there is only a single config file, it is presumed to be the one you want. If there is more than one (and there is), you'll be asked which one you want.

  • The infrastructure code will next try to determine a useful IP address for the system it's running on. Virtually all systems have multiple IP addresses, and the infrastructure code may or may not succeed in identifying one that is clearly superior to all the others. If it does, it will simply use that one. Otherwise, it will display a list of candidates to you and ask you which to use. If the infrastructure is confident in its choice but wrong, or if you get tired of answering its question every launch, you can set the config file field net.host.ip to the IP that should be used and you won't be asked again.
You're now at a prompt line asking which application you'd like to execute. Enter an empty line to see a list of available applications. Type 'exit' to terminate.

Having set the command line argument, subsequent launches of the app are a bit easier: right-click on ConsoleApps, then Debug As, then Java Application. A dialog appears; choose ConsoleStart and then OK. (Even quicker, as long as you have the ConsoleApps project or a file in it selected, just press the bug icon in Eclipse's top bar to launch under the last debug configuration.)

4. Generate Javadoc

The Eclipse source editor is actually pretty nice, but it's most useful when there is Javadoc available. Click on the Project menu item at the top, then Generate Javadoc. You'll see a dialog asking for which projects to generate Javadoc. Pick the src folder below each of the folders in the list on the left, then set other options to generate as much documentation as possible, and then move forward through the dialogs.

Computer Science & Engineering
University of Washington
Box 352350
Seattle, WA  98195-2350
(206) 543-1695 voice, (206) 543-2969 FAX
[comments to arvind at cs.washington.edu]