2 Eclipse Overview

13
GETTING STARTED WITH ECLIPSE

Transcript of 2 Eclipse Overview

  • 7/28/2019 2 Eclipse Overview

    1/13

    GETTING STARTED WITH

    ECLIPSE

  • 7/28/2019 2 Eclipse Overview

    2/13

    Eclipse is an Integrated Development

    Environment (IDE) that allows you to enter,

    compile, and run programs.

    The programs can be written in one of many

    different languages.

    the language's compiler must be installed. The

    compiler installation is separate from Eclipse's

    installation.

  • 7/28/2019 2 Eclipse Overview

    3/13

    Start Eclipse

    Start menu or

    Shortcut

  • 7/28/2019 2 Eclipse Overview

    4/13

    Create a workspace

    A workspace contains all your projects and

    settings

    Workspace Launcher dialog box appears

    In the Workspace box, enter d:\section

    Uncheck "Use this as a default and do not ask

    again"

  • 7/28/2019 2 Eclipse Overview

    5/13

    Workbench

    main Eclipse window

    area where you'll do all your work enter,

    debug, and run code

    contains things like the menu bar, toolbar,

    editor, and views

  • 7/28/2019 2 Eclipse Overview

    6/13

    Perspective

    an Eclipse way of grouping the layout of the

    various views, toolbars, and menus according

    to the specific task you're doing

    Eclipse can be used for many different

    languages

    If the previous Eclipse user used it for a language

    other than Java

    Switch the Eclipseperspective back to Java

    top-right corner of your workspace window

  • 7/28/2019 2 Eclipse Overview

    7/13

    Project

    an entity that helps to organize all the files in

    a particular program

    a collection of a set of source files

    To create a project:

    Select File / New / Project

  • 7/28/2019 2 Eclipse Overview

    8/13

  • 7/28/2019 2 Eclipse Overview

    9/13

    Package Explorer pane

    contains your workspace's project folders

    If not shown, open it as follows:

    Select Window / Show View

  • 7/28/2019 2 Eclipse Overview

    10/13

    Create a source code file

    In Package Explorer, right click on the project

    name

    Select New / File

    In the New File window, select your folder.

    In the File name box, enter Hello.java.

    an empty Hello.java frame should appear in

    the workbench

  • 7/28/2019 2 Eclipse Overview

    11/13

    Basic Steps

    Create a source code file

    Understand the code

    Save the source file Compile your program

    Fix compilation errors, if any

    See your program in the Package Explorer pane

    Run the program

  • 7/28/2019 2 Eclipse Overview

    12/13

    Run the program

    Right click on the Hello.java file

    Select Run As

    Select Java Application in the pop-upsubmenu

    the Console tab should appear in the bottom of

    the workbench window

  • 7/28/2019 2 Eclipse Overview

    13/13

    Terminating the program

    red button at the upper-right corner of your

    Console frame

    Run the program using the Run icon

    green-circle icon with a white triangular arrow

    inside it at the top of the workbench