Computer Science 2311
Fall 2009
Laboratory Assignment 1 - Linux version

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

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

  2. Log in using your Pirate id and password.

  3. Double-click the icon on the desktop that shows your home directory. In the window that pops up, select File/Create Folder. Create a folder for your program and move into that folder.

  4. Select File/Create Document. Create an empty document called Assn1.java. (Be sure to capitalize it exactly as shown.)

  5. Edit the document so that it reads as follows. But replace Your name with your name.

      // Your name
    
      public class Assn1
      {
        public static void main(String[] args)
        {
          String name = "Your name";
          System.out.println("Hello, " + name);
        }
      }
    
    Save the file.

  6. Right-click on the background and select Open in terminal. A window will pop up.

  7. In the window, type command

      cd Assignment1
      javac Assn1.java
    
    If there are errors, they will be reported. Fix them and try again. If no errors are reported, move on to the next step.
  8. Type command

      java Assn1
    
    Your program should run.

  9. When you are done, log out by selecting Computer from the lower-left corner of the screen, and selecting Logout.