Introduction to eclipse
1 / 19

Introduction to Eclipse - PowerPoint PPT Presentation

  • Updated On :

Introduction to Eclipse. cs112b1 – Lab01 by Rui Shi. General Information. TF: Rui Shi Office: MCS 174 Office hours: Mon 3-5pm, Fri 3-5pm Email: [email protected] For any general questions about the course, please send email to [email protected] What is Eclipse?.

Related searches for Introduction to Eclipse

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
Download Presentation

PowerPoint Slideshow about 'Introduction to Eclipse' - margo

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
Introduction to eclipse

Introduction to Eclipse

cs112b1 – Lab01

by Rui Shi

General information
General Information

What is eclipse
What is Eclipse?

  • An Integrated Development Environment

  • Provides many features to ease Java programming (and others, e.g. C/C++)

    • Editor

    • Debugger

    • Source Control

Getting eclipse
Getting Eclipse

  • At the CS labs…

    • It’s already installed

  • At home…

    • Download the latest version at:


    • You may need to install Java SDK1.5 or JRE if you haven’t from


    • For help, send email to the course mailing list

Installing and running eclipse
Installing and Running Eclipse

  • Installation is very simple

    • Just unpack the downloaded package

  • Running Eclipse

    • Then click eclipse.exe (under Windows)

    • Run eclipse (under Linux)

    • Eclipse will start running if all the prerequisites are met

    • Demo: Run Eclipse

Setting up your workspace
Setting up your Workspace

  • Workspace is where your projects and programs are stored.

    • Usually some directory in the file system

    • The workspace is set when Eclipse starts

    • In this course, for instance, we may set the work space to

      • /home/usrname/course/cs112b1

      • All code will be saved in this directory

      • Demo

Some important concepts about eclipse environment
Some important concepts about Eclipse Environment

  • Workbench

  • Perspective

  • Views

  • Editor


  • The term Workbench refers to the desktop development environment

  • The Workbench aims to achieve seamless tool integration and controlled openness by providing a common paradigm for the creation, management, and navigation of workspace resources.

Understanding perspective
Understanding Perspective

  • Each Workbench window contains one or more perspectives

  • Each perspective provides a set of functionality aimed at accomplishing a specific type of task or works with specific types of resources.

  • For example, the Java perspective combines views that you would commonly use while editing Java source files, while the C/C++ perspective contains the views that you would use for editing C++ files

  • You might need switch perspectives frequently.

Built in eclipse perspectives
Built-in Eclipse Perspectives

  • Resource

    • Arrange your files and projects.

  • Java

    • Develop programs in the Java language.

  • Debug

    • Diagnose and debug problems that occur at runtime.

  • Java Browsing

  • Java Type Hierarchy

  • Plug-in Development

  • CVS Repository Exploring

  • Team Synchronizing


  • Views support editors and provide alternative presentations as well as ways to navigate the information in your Workbench.

  • For example, the Navigator and other navigation views display projects and other resources that you are working with.


  • Most perspectives in the Workbench are comprised of an editor area and one or more views

  • You can associate different editors with different types of files.

  • Any number of editors can be open at once, but only one can be active at a time.

Creating java projects
Creating Java Projects

  • Demo: Creating a project for assignment1 in the workspace

Creating java packages
Creating Java Packages

  • A Package in Java is a group of classes which are often closely or logically related in some way

  • Package corresponds to the directory hierarchy in the file system.

    • course.cs112b1.assignment1

  • Organizing source files into different packages is a good programming style.

  • Demo: creating a package

Adding java classes
Adding Java Classes

  • Class is the basic compilation unit in Java.

  • Demo: Creating the Employee class of assignment1

Import existing files
Import existing files

  • Some files are given and you want to import them to your projects rather than creating them again

  • Demo: Importing other files of assignment1 to the project

  • You can also copy-and-paste files to your project folder

    • Refresh the file view if you don’t see them

Running the code
Running the code

  • Currently, no implementation is provided in the given files. You are expected to fill the implementation details.

  • We need a class which has a main() method as the entrance for execution

  • Demo: Adding the main() method in and run the program

Other issues
Other issues

  • Demo:

    • Removing files from the project

    • Check (or not) “Build Automatically”

    • Window->Preferences

    • Project->Properties

  • Eclipse provides a very good Help system

    • “Help->Help Contents” for more information