Guide to Object-oriented Programming With Java (Buffalo State College Version)


Chapter 1: Setting Up Your Eclipse Environment

The Eclipse Interactive Development Environment (IDE)

This guide will use the Eclipse Neon version as our code editor (IDE).

If you want to develop Java programs on your own machine (Linnux, MacOS, or Windows) the you need download and install eclipse.

Open Eclipse you need to setup your workspace. See the Eclipse Icons web site for an explanaton of the toolbar icons. You need to create a new project (edu) to store your .java files. Then you need to create new packages:

Toolbar
  1. In the Toolbar, click: File
  2. Choose: New
    1. Choose: Java Project
    2. In the Project Name: text field, type: edu
    3. Click: Finish
  3. Right-click on: edu
    1. Choose: New
    2. Choose: Package
    3. In the Name: text field, type: buffalostate.edu.sp18.assignments.your-last-name
    4. Click: Finish
  4. Right-click on: edu
    1. Choose: New
    2. Choose: Package
    3. In the Name: text field, type: buffalostate.edu.sp18.exercises.your-last-name
    4. Click: Finish

Figure 1-1: Setting Up Your Eclipse Workspace

You are now ready to create your first Java program.

Toolbar
  1. In the Toolbar, click: File
  2. Choose: New
    1. Choose: class
    2. In the Name: text field, type: HelloWorld
    3. Check the box for: public static void main(String[] args)
    4. Click: Finish

Your new file will open in the editor window with the template code. Next Chapter will expand on this file.

Figure 1-2: Setting Up Your Eclipse Workspace
Creative Commons License This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. Copyright © 2016-2018 Jim Gerland