Computer Science 2311
Fall 2009
Laboratory Assignment 1 - Windows version

This assignment is just to familiarize yourself with the lab environment. There is also a Linux version.

  1. Sit down at one of the computers in Austin 209. If the computer is not turned on, turn it on.

  2. Log in using your Pirate id and password.

  3. There is a folder called Applications on the desktop. Open it, and double-click on Eclipse 3.2.

  4. You will be asked for a workspace. Push that Browse button. Find CS HOME (H:). Select your home folder in H: as your workspace.

  5. Using the menu at the top of the Eclipse window, select File/New/Project, and then select Java Project. You will be asked for the name of the project. Choose a name, such as Assignment1.

  6. The project will show up in a bar on the left side of the screen. Right click on the project, and select New class. Choose a name for your class (such as Assn1) and type it in the box labeled name. There must not be any spaces in the name. Click Finish.

  7. You will be presented with an edit window holding an empty class definition. Type your name at the top of the file in a comment.

      // Your name here
    
    Type your main method inside the class. The method should just say hello to you when you run it. It should look like this.
      public static void main(String[] args)
      {
        String name = "your name here";
        System.out.println("Hello, " + name);
      }
    

  8. Save your program using menu File/Save.

  9. Run your program by right-clicking the name of the class file (such as Assn1.java) and selecting Run As/Java application. If the program has errors, they will be shown at the bottom of the screen. Click on one to see what it is. If the program has no compile errors, it will run, and should show its message in a box at the bottom of the screen.

  10. Once your program is working, print it and turn it in. Close Eclipse. Then log out (from the start menu). Be sure to log out, since otherwise somebody can come up to the machine and start using your account.