Getting started

  1. Login to your account
  2. Double click CFS (Common File System) on the desktop. Do this every time you login. It mounts your private file system as drive m.. If it complains that you do not have a CFS account, visit itaccounts.iu.edu to create one. You can access CFS files via any web browser via http://cfs.iu.edu
  3. With the public machines on this campus, like the one you are using, the user profile is initialized to a standard one every day, so customizations don't stick. This includes internet favorites. So it will help to create a shortcut to the class web in your CFS directory as follows:
    1. Visit the course home page http://www.cs.indiana.edu/~chaynes/pi/ using IE (Internet Explorer)
    2. Right click on the page (not a link on the page)
    3. Select Create Shortcut to save a shortcut to the desktop
    4. Drag the shortcut from the desktop to your CFS directory.
    5. Double-click it to try it out.
  4. Visit the Java API documentation page and repeat the above process so you have a shortcut to it as well.
  5. Download pi zip and extract it into m:\ (your CFS directory). To do this, right-click the pi.zip link, select open, click open in the file download dialog that pops up, click the extract WinZip button, enter m: in the Extract to text box, and click Extract.  Don't mess with the DrJava.lnk or OD-DrJava.jar files this creates.
  6. Start the DrJava IDE (Integrated Development Environment) by clicking on the DrJava link in your CFS directory. Be patient; it takes a while to load.
  7. Cut the following program and paste it into the main DrJava window (for program editing).
    import objectdraw.*;
    import java.awt.*;
    
    public class MakeBox extends FrameWindowController {
       
       public void begin() {
          // draw on canvas a 20 by 40 rectangle at location (80, 40)
          new FilledRect(80, 40, 20, 40, canvas);
       }
    }
  8. Click the Compile All button.
  9. Click the Interactions tab.
  10. In the Interactions window type: new MakeBox() and hit return to run your first Java program, which pops up a frame with a box in it.

Notes