How to Install Eclipse for Java Development

Installation on Windows:

You will need:
  1. The Java JDK for Windows 32bit or 64bit depending on your personal computer
  2. Eclipse IDE for Java Developers
    1. Select Eclipse IDE for Java Developers (not for EE developers)
Watch this video for step-by-step instructions on downloading and installing the above.

Installation on the Mac:

You will need:

Watch this tutorial for step-by-step instructions on downloading and installing the above.

How to Run Your Code:

  • Open up Eclipse by double clicking on the icon
  • Click OK to select the default workspace (remember where this is!)
  • Go to File->New->Java Project

  • Next it will prompt you to enter the name for your project. A project is where you will store the files related to your program. Give the project an appropriate name and click finish. In the below example, I selected the name Test.

  • The name of your project should now appear in project explorer on the left. If not, click on the button with the two boxes on the right hand side of the screen (as shown below)

  • Now you should see the name of your project on the left in the project explorer. Click on the arrow beside the project to see the files and folders that are contained in this project.

  • Next, click on the project name so it is highlighted, then got to File->New File->Class
  • A new window appears. Enter the name of your class here. This can be the same as the project. Again, I selected the name Test.

  • Once you have entered the name of the class, click the Finish button (in blue above)
  • Now, you should see the Test class appear under the src folder in the project explorer.
  • Also, if you click on the name of this file, some Java code will appear in the large middle box that reads public class Test { }

  • Add some additional code so that it now reads as follows:

  • Make sure that all punctuation and spelling is IDENTICAL to the above.
  • Now try running your code by clicking on the green arrow and then pressing ok

  • Verify that Hello, World! gets printed in the box at the bottom middle of the screen.

  • If the message printed out as shown above then everything is installed correctly. If not, try again and/or contact the instructor. If you have a laptop, you can bring it to office hours and the instructor will try to help you get Eclipse installed.

  • Go to Source->Format
  • Alternately, CNTRL + F or CMD + F