Lab 1 Compiling and running a simple Java program

Follow these steps:

  1. Download the Java program from here (hold down the option key when you click on the link). Put it in the student folder.
  2. Compile it using the Java compiler. Open the compiler, and choose the file you just downloaded using the File menu.
  3. Run it using the Java runner. Open the runner, and choose the .class file just created by the compiler. Just press Return at the prompt for command line arguments, but you will need to type some text into the standard input box. Press Return and then Apple-Enter (the "apple" or comand key and the Enter at the extreme right of the keyboard). It will produce output in the standard output box.
  4. Save the standard output to a file in the student folder. Open the output file using SimpleText and print it on the laser printer. Alos load the .java file into the editor and print it.
  5. Use the Fetch program to copy your .java file to your UNIX workspace. You will need to type your UNIX login name and password into the dialog box. Leave the last box (initial directory) blank. Use the Put button to copy a file over to your UNIX directory.
  6. Tidy up, and switch off using Shutdown from the Special menu .