Compiling from the Command Line

  1. Save the code for your class in a file named Classname.java.
  2. Open a terminal window and cd in the ditrectory where your code is saved.
  3. To compile, type javac Classname.java.
  4. Fix any errors and go back to step 3.
  5. To run, type java Classname.

Getting Started with Eclipse

  1. Launch Eclipse and indicate the location of your workspace.
  2. Create a new project by selecting File->New->Project.
  3. Select Java Project and click next.
  4. Type the name of your project and click Finish.
  5. Create new class by selecting File->New->Class.
  6. Type the name of the class and click Finish.
  7. Type your code.
  8. To run, select Run->Run As->Java Application.
  9. If the console does not appear at the bottom of the screen, select Window->Show View->Console.

Sami Rollins