SlideShare a Scribd company logo
i
i
AbouttheTutorial
Eclipse is an integrated development environment (IDE) for Java and other programming
languages like C, C++, PHP, and Ruby etc. Development environment provided by Eclipse
includes the Eclipse Java development tools (JDT) for Java, Eclipse CDT for C/C++, and
Eclipse PDT for PHP, among others.
This tutorial will teach you how to use Eclipse in your day-2-day life while developing any
software project using Eclipse IDE. We will give special emphasis on Java project.
Audience
This tutorial has been prepared for beginners to help them understand basic functionality
of Eclipse tool. After completing this tutorial, you will find yourself at a moderate level of
expertise in using Eclipse IDE from where you can take yourself to next levels.
Prerequisites
We assume you are going to use Eclipse IDE to handle all levels of Java projects
development. So it will be good if you have knowledge of software development using any
programming language specially Java programming.
Copyright&Disclaimer
© Copyright 2015 by Tutorials Point (I) Pvt. Ltd.
All the content and graphics published in this e-book are the property of Tutorials Point (I)
Pvt. Ltd. The user of this e-book can retain a copy for future reference but commercial use
of this data is not allowed. Distribution or republishing any content or a part of the content
of this e-book in any manner is also not allowed without written consent of the publisher.
We strive to update the contents of our website and tutorials as timely and as precisely as
possible, however, the contents may contain inaccuracies or errors. Tutorials Point (I) Pvt.
Ltd. provides no guarantee regarding the accuracy, timeliness or completeness of our
website or its contents including this tutorial. If you discover any errors on our website or
in this tutorial, please notify us at contact@tutorialspoint.com
Eclipse
ii
TableofContents
About the Tutorial....................................................................................................................................i
Audience..................................................................................................................................................i
Prerequisites............................................................................................................................................i
Copyright & Disclaimer.............................................................................................................................i
Table of Contents....................................................................................................................................ii
1. OVERVIEW...........................................................................................................................1
What is Eclipse? ......................................................................................................................................1
Licensing .................................................................................................................................................1
Eclipse Releases ......................................................................................................................................1
2. INSTALLATION .....................................................................................................................3
Downloading Eclipse ...............................................................................................................................3
Installing Eclipse......................................................................................................................................3
Launching Eclipse ....................................................................................................................................4
3. EXPLORE WINDOWS............................................................................................................5
Parts of an Eclipse Window .....................................................................................................................5
Using Multiple Windows .........................................................................................................................6
4. EXPLORE MENUS.................................................................................................................7
Typical Eclipse Menus .............................................................................................................................7
Brief Description of Menus......................................................................................................................8
Customizing Menus.................................................................................................................................8
5. EXPLORE VIEWS...................................................................................................................9
About Views............................................................................................................................................9
Organizing Views.....................................................................................................................................9
Moving Views..........................................................................................................................................9
Eclipse
iii
Creating View Folders ...........................................................................................................................10
Opening a view .....................................................................................................................................10
6. PERSPECTIVES ...................................................................................................................13
What is a Perspective? ..........................................................................................................................13
Opening a Perspective...........................................................................................................................13
Switching between Perspectives ...........................................................................................................13
Closing a Perspective.............................................................................................................................14
Customizing a Perspective.....................................................................................................................14
7. WORKSPACES....................................................................................................................16
About Eclipse Workspace......................................................................................................................16
UI Elements for Managing the Workspace ............................................................................................16
8. CREATE JAVA PROJECT ......................................................................................................18
Opening the New Java Project wizard ...................................................................................................18
Using the New Java Project wizard........................................................................................................18
Viewing the Newly Created Project.......................................................................................................20
9. CREATE JAVA PACKAGE .....................................................................................................21
Opening the New Java Package wizard..................................................................................................21
Using the New Java Package Wizard .....................................................................................................21
Viewing the Newly Created Package .....................................................................................................22
10. CREATE JAVA CLASS...........................................................................................................23
Opening the New Java Class Wizard......................................................................................................23
Using the New Java Class Wizard ..........................................................................................................23
Viewing the Newly Created Java class...................................................................................................24
11. CREATE JAVA INTERFACE...................................................................................................25
Opening the New Java Interface Wizard................................................................................................25
Eclipse
iv
Using the New Java Interface Wizard ....................................................................................................25
Viewing the Newly Created Java Interface ............................................................................................26
12. CREATE XML FILE...............................................................................................................27
Opening the New XML File wizard.........................................................................................................27
Using the New XML File wizard .............................................................................................................28
Viewing the Newly Created XML File.....................................................................................................29
13. JAVA BUILD PATH ..............................................................................................................30
Setting the Java Build Path....................................................................................................................30
14. RUN CONFIGURATION.......................................................................................................31
Creating and Using a Run Configuration................................................................................................31
15. RUNNING A PROGRAM......................................................................................................33
Running a Java Program........................................................................................................................33
16. CREATE JAR FILES ..............................................................................................................35
Opening the Jar File wizard ...................................................................................................................35
Using the Jar File wizard........................................................................................................................35
17. CLOSE PROJECT .................................................................................................................37
Why Close a Project?.............................................................................................................................37
How to Close a Project? ........................................................................................................................37
Closed Project in Package Explorer........................................................................................................38
18. REOPEN PROJECT ..............................................................................................................39
Reopening a Closed Project...................................................................................................................39
19. BUILD PROJECT..................................................................................................................40
Building a Java Project ..........................................................................................................................40
20. DEBUG CONFIGURATION...................................................................................................42
Eclipse
v
Creating and Using a Debug Configuration............................................................................................42
21. DEBUGGING A PROGRAM..................................................................................................44
Debugging a Java Program ....................................................................................................................44
22. PREFERENCES....................................................................................................................48
Setting Preferences ...............................................................................................................................48
23. CONTENT ASSIST ...............................................................................................................50
Using Content Assist..............................................................................................................................50
24. QUICK FIX ..........................................................................................................................52
Using Quix Fix........................................................................................................................................52
25. HOVER HELP......................................................................................................................54
Using Hover Help...................................................................................................................................54
26. SEARCH MENU ..................................................................................................................56
Searching the Workspace......................................................................................................................56
27. NAVIGATION......................................................................................................................58
Navigating the Eclipse Workspace.........................................................................................................58
Open Type.............................................................................................................................................58
Open Type in Hierarchy.........................................................................................................................60
Open Resource......................................................................................................................................61
28. REFACTORING ...................................................................................................................63
Refactoring using Eclipse.......................................................................................................................63
29. ADD BOOKMARKS..............................................................................................................64
About Bookmarks .................................................................................................................................64
Adding a Bookmark...............................................................................................................................64
Opening the Bookmarks View ...............................................................................................................64
Eclipse
vi
Using the Bookmarks View....................................................................................................................65
30. TASK MANAGEMENT.........................................................................................................66
Managing Tasks.....................................................................................................................................66
Opening the Tasks View ........................................................................................................................67
Using the Tasks View.............................................................................................................................67
31. INSTALL PLUGINS...............................................................................................................69
Locating and Installing Plug-ins .............................................................................................................69
32. CODE TEMPLATES..............................................................................................................73
Using Code Templates...........................................................................................................................73
Modifying/Adding code templates........................................................................................................74
33. SHORTCUTS.......................................................................................................................75
About Shortcuts ....................................................................................................................................75
34. RESTART OPTION...............................................................................................................78
Restarting Eclipse..................................................................................................................................78
35. TIPS & TRICKS....................................................................................................................79
36. WEB BROWSERS................................................................................................................81
Internal Web Browser...........................................................................................................................81
Eclipse
7
WhatisEclipse?
In the context of computing, Eclipse is an integrated development environment (IDE) for
developing applications using the Java programming language and other programming
languages such as C/C++, Python, PERL, Ruby etc.
The Eclipse platform which provides the foundation for the Eclipse IDE is composed of plug-
ins and is designed to be extensible using additional plug-ins. Developed using Java, the
Eclipse platform can be used to develop rich client applications, integrated development
environments, and other tools. Eclipse can be used as an IDE for any programming language
for which a plug-in is available.
The Java Development Tools (JDT) project provides a plug-in that allows Eclipse to be used
as a Java IDE, PyDev is a plugin that allows Eclipse to be used as a Python IDE, C/C++
Development Tools (CDT) is a plug-in that allows Eclipse to be used for developing application
using C/C++, the Eclipse Scala plug-in allows Eclipse to be used an IDE to develop Scala
applications and PHPeclipse is a plug-in to eclipse that provides complete development tool
for PHP.
Licensing
Eclipse platform and other plug-ins from the Eclipse foundation is released under the Eclipse
Public License (EPL). EPL ensures that Eclipse is free to download and install. It also allows
Eclipse to be modified and distributed.
EclipseReleases
Every year, since 2006, the Eclipse foundation releases the Eclipse Platform and a number of
other plug-ins in June.
Codename Year Platform Version
Callisto 2006 3.2
Europa 2007 3.3
Ganymede 2008 3.4
1. OVERVIEW
Eclipse
8
Galileo 2009 3.5
Helios 2010 3.6
Indigo 2011 3.7
Juno 2012 3.8 and 4.2
Kepler 2013 4.3
Luna 2014 4.4.0
Eclipse
9
DownloadingEclipse
You can download eclipse from http://www.eclipse.org/downloads/. The download page lists
a number of flavors of eclipse.
The capabilities of each packaging of eclipse are different. Java developers typically use
Eclipse Classic or Eclipse IDE for developing Java applications.
The drop down box in the right corner of the download page allows you to set the operating
system on which eclipse is to be installed. You can choose between Windows, Linux and Mac.
Eclipse is packaged as a zip file.
InstallingEclipse
To install on windows, you need a tool that can extract the contents of a zip file. For example
you can use:
 7-zip
 PeaZip
 IZArc
Using any one of these tools, extract the contents of the eclipse zip file to any folder of your
choice.
2. INSTALLATION
Eclipse
10
LaunchingEclipse
On the windows platform, if you extracted the contents of the zip file to c:, then you can
start eclipse by using c:eclipseeclipse.exe
When eclipse starts up for the first time it prompts you for the location of the workspace
folder. All your data will be stored in the workspace folder. You can accept the default or
choose a new location.
Eclipse
11
If you select "Use this as the default and do not ask again", this dialog box will not come up
again. You can change this preference using the Workspaces Preference Page. See the
Preference tutorial page for more details.
Eclipse
12
PartsofanEclipseWindow
The major visible parts of an eclipse window are:
 Views
 Editors (all appear in one editor area)
 Menu Bar
 Toolbar
An eclipse perspective is the name given to an initial collection and arrangement of views and
an editor area. The default perspective is called java. An eclipse window can have multiple
perspectives open in it but only one perspective can be active at any point of time. A user can
switch between open perspectives or open a new perspective. A perspective controls what
appears in some menus and tool bars.
3. EXPLORE WINDOWS
Eclipse
13
A perspective has only one editor area in which multiple editors can be open. The editor area
is usually surrounded by multiple views. In general, editors are used to edit the project data
and views are used to view the project metadata. For example, the package explorer shows
the java files in the project and the java editor is used to edit a java file.
The eclipse window can contain multiple editors and views but only one of them is active at
any given point of time. The title bar of the active editor or view looks different from all the
others.
The UI elements on the menu bar and tool bar represent commands that can be triggered by
an end user.
UsingMultipleWindows
Multiple Eclipse Windows can be open at the same time. To open a new window, click on the
Windows menu and select the New Window menu item.
Each window can have a different perspective open in them. For example you could open two
Eclipse windows one in the Java perspective and the other in the Debug perspective. The
window showing the Java perspective can be used for editing the java code and the window
showing the debug perspective can be used for debugging the application being developed.
Eclipse
14
TypicalEclipseMenus
The typical menus available on the menu bar of an Eclipse window are:
 File menu
 Edit menu
 Navigate menu
 Search menu
 Project menu
 Run menu
 Window menu
 Help menu
4. EXPLORE MENUS
Eclipse
15
Plug-ins can add new menus and menu items. For example when the java editor is open, you
will see the Source menu and when the XML editor is open, you will see the Design menu.
BriefDescriptionofMenus
Menu
Name
Description
File The File menu allows you to open files for editing, close editors, save editor
content and rename files. Among the other things, it also allows you to
import and export workspace content and shutdown Eclipse.
Edit The Edit menu presents items like copy & paste.
Source The Source menu is visible only when a java editor is open. It presents a
number of useful menu items related to editing java source code.
Navigate The Navigate menu allows you to quickly locate resources and navigate to
them.
Search The Search menu presents items that allow you to search the workspace
for files that contain specific data.
Project The menu items related to building a project can be found on the Project
menu.
Run The menu items on the Run menu allow you to start a program in the run
mode or debug mode. It also presents menu items that allow you to debug
the code.
Window The Window menu allows you to open and close views and perspectives. It
also allows you to bring up the Preferences dialog.
Help The Help menu can be used to bring up the Help window, Eclipse
Marketplace view or Install new plug-ins. The about Eclipse menu item gives
you version information.
Eclipse
16
CustomizingMenus
The visible menu items on a menu depend on the installed plug-ins and customization done
using the Customize Perspective dialog box.
Eclipse
17
AboutViews
Eclipse views allow users to see a graphical representation of project metadata. For example
the project navigator view presents a graphical representation of the folders and files
associated with a project and properties view presents a graphical representation of an
element selected in another view or editor.
An eclipse perspective can show any number of views and editors. All editor instances appear
in a single editor area, whereas views are placed inside view folders. A workbench window
can display any number of view folders. Each view folder can display one or more views.
OrganizingViews
The following picture shows four views arranged in a view folder.
The picture given below shows the same four views arranged in two view folders.
5. EXPLORE VIEWS
Eclipse
18
MovingViews
To move a view from one view folder to another, just click on the view title and drag to the
title bar area of another view folder. The green line shown below is a result of dragging the
title bar of the Properties view from one view folder to the title bar area of another view folder.
The Properties view can be moved to where the green line is by releasing the mouse button
and sending out a drop event.
CreatingViewFolders
View folders can be dynamically created by dragging the title bar of a view to anywhere
outside the editor area and title bar of another view folder. As you drag the title bar around,
green lines will indicate where exactly the new view folder will be created.
Moving the drag icon to the bottom of a window allows you to create a view folder that spans
the entire width of the window. Moving the drag icon to the left or right edge of window allows
you to create a view folder that spans the entire height of the window.
Eclipse
19
Openingaview
To open a view, click on the Window menu and select the Show View menu item.
Eclipse
20
Clicking on the Other menu item brings up the Show View dialog box that allows you to locate
and activate a view.
Eclipse
21
The views are organized by category. To quickly locate a view, just type the name of a view
into the filter text box. To open a view, select it and click on the OK button. The subsequent
pages of this tutorial introduce you to a number of useful views.
Eclipse
22
End of ebook preview
If you liked what you saw…
Buy it from our store @ https://store.tutorialspoint.com

More Related Content

What's hot (15)

PDF
Javascript tutorial
Doeun KOCH
 
PDF
D programming tutorial
HarikaReddy115
 
PDF
Go tutorial
Muhammed Hassan M
 
PDF
Objective c tutorial
HarikaReddy115
 
PDF
Intellij idea tutorial
HarikaReddy115
 
PDF
Javascript tutorial
HarikaReddy115
 
PDF
Asp.net mvc tutorial
HarikaReddy115
 
PDF
Gprs tutoial
sushsky1
 
PDF
Perl tutorial
HarikaReddy115
 
PDF
Jquery mobile tutorial
HarikaReddy115
 
PDF
Lua tutorial
HarikaReddy115
 
PDF
Jdbc tutorial
HarikaReddy115
 
PDF
Tcl tk tutorial
dftmaterialslakshmi
 
PDF
Behavior driven development_tutorial
HarikaReddy115
 
PDF
Javafx tutorial
HarikaReddy115
 
Javascript tutorial
Doeun KOCH
 
D programming tutorial
HarikaReddy115
 
Go tutorial
Muhammed Hassan M
 
Objective c tutorial
HarikaReddy115
 
Intellij idea tutorial
HarikaReddy115
 
Javascript tutorial
HarikaReddy115
 
Asp.net mvc tutorial
HarikaReddy115
 
Gprs tutoial
sushsky1
 
Perl tutorial
HarikaReddy115
 
Jquery mobile tutorial
HarikaReddy115
 
Lua tutorial
HarikaReddy115
 
Jdbc tutorial
HarikaReddy115
 
Tcl tk tutorial
dftmaterialslakshmi
 
Behavior driven development_tutorial
HarikaReddy115
 
Javafx tutorial
HarikaReddy115
 

Similar to Eclipse tutorial (20)

PDF
intro-to-eclipse.pdf
Sajeev P
 
PDF
Eclipse In Action A Guide For Java Developers 1st Edition David Gallardo
spatzoachskq
 
PPTX
3 more abouteclipse
smitraSlideShare
 
DOCX
Page 8 of 83.Tutorial Get Started with Eclipse in the Compute.docx
alfred4lewis58146
 
PDF
Total beginner companion_document
fujimiyaaya
 
PDF
Total beginner companion_document
mdsumonkhan
 
PDF
Eclipse Way
Tomasz Zarna
 
PPT
Introduction to Eclipse IDE
Muhammad Hafiz Hasan
 
PDF
Eclipse Way
Tomasz Zarna
 
PDF
Eclipse workshop presentation
Miguel Pardal
 
PPTX
Eclipse workshop presentation (March 2016)
Miguel Pardal
 
PPTX
Introduction to Eclipse
Arpana Awasthi
 
PDF
Installation
VenkataBolagani
 
PDF
Supplement J Eclipse
nga
 
PPT
Eclipse IDE
Anirban Majumdar
 
PDF
JF_4_1_sg.pdf
efranschristian
 
PDF
Eclipse - GUI Palette
Arpana Awasthi
 
PPT
Eclipse introduction IDE PRESENTATION
AYESHA JAVED
 
PPT
Eclipse Training - Introduction
Luca D'Onofrio
 
PDF
Phpeclipse A User Guide 1st Edition Shu Wai Chow
ruslsnwarcas
 
intro-to-eclipse.pdf
Sajeev P
 
Eclipse In Action A Guide For Java Developers 1st Edition David Gallardo
spatzoachskq
 
3 more abouteclipse
smitraSlideShare
 
Page 8 of 83.Tutorial Get Started with Eclipse in the Compute.docx
alfred4lewis58146
 
Total beginner companion_document
fujimiyaaya
 
Total beginner companion_document
mdsumonkhan
 
Eclipse Way
Tomasz Zarna
 
Introduction to Eclipse IDE
Muhammad Hafiz Hasan
 
Eclipse Way
Tomasz Zarna
 
Eclipse workshop presentation
Miguel Pardal
 
Eclipse workshop presentation (March 2016)
Miguel Pardal
 
Introduction to Eclipse
Arpana Awasthi
 
Installation
VenkataBolagani
 
Supplement J Eclipse
nga
 
Eclipse IDE
Anirban Majumdar
 
JF_4_1_sg.pdf
efranschristian
 
Eclipse - GUI Palette
Arpana Awasthi
 
Eclipse introduction IDE PRESENTATION
AYESHA JAVED
 
Eclipse Training - Introduction
Luca D'Onofrio
 
Phpeclipse A User Guide 1st Edition Shu Wai Chow
ruslsnwarcas
 
Ad

More from HarikaReddy115 (20)

PDF
Dbms tutorial
HarikaReddy115
 
PDF
Data structures algorithms_tutorial
HarikaReddy115
 
PDF
Wireless communication tutorial
HarikaReddy115
 
PDF
Cryptography tutorial
HarikaReddy115
 
PDF
Cosmology tutorial
HarikaReddy115
 
PDF
Control systems tutorial
HarikaReddy115
 
PDF
Computer logical organization_tutorial
HarikaReddy115
 
PDF
Computer fundamentals tutorial
HarikaReddy115
 
PDF
Compiler design tutorial
HarikaReddy115
 
PDF
Communication technologies tutorial
HarikaReddy115
 
PDF
Biometrics tutorial
HarikaReddy115
 
PDF
Basics of computers_tutorial
HarikaReddy115
 
PDF
Basics of computer_science_tutorial
HarikaReddy115
 
PDF
Basic electronics tutorial
HarikaReddy115
 
PDF
Auditing tutorial
HarikaReddy115
 
PDF
Artificial neural network_tutorial
HarikaReddy115
 
PDF
Artificial intelligence tutorial
HarikaReddy115
 
PDF
Antenna theory tutorial
HarikaReddy115
 
PDF
Analog communication tutorial
HarikaReddy115
 
PDF
Amplifiers tutorial
HarikaReddy115
 
Dbms tutorial
HarikaReddy115
 
Data structures algorithms_tutorial
HarikaReddy115
 
Wireless communication tutorial
HarikaReddy115
 
Cryptography tutorial
HarikaReddy115
 
Cosmology tutorial
HarikaReddy115
 
Control systems tutorial
HarikaReddy115
 
Computer logical organization_tutorial
HarikaReddy115
 
Computer fundamentals tutorial
HarikaReddy115
 
Compiler design tutorial
HarikaReddy115
 
Communication technologies tutorial
HarikaReddy115
 
Biometrics tutorial
HarikaReddy115
 
Basics of computers_tutorial
HarikaReddy115
 
Basics of computer_science_tutorial
HarikaReddy115
 
Basic electronics tutorial
HarikaReddy115
 
Auditing tutorial
HarikaReddy115
 
Artificial neural network_tutorial
HarikaReddy115
 
Artificial intelligence tutorial
HarikaReddy115
 
Antenna theory tutorial
HarikaReddy115
 
Analog communication tutorial
HarikaReddy115
 
Amplifiers tutorial
HarikaReddy115
 
Ad

Recently uploaded (20)

PDF
ARAL-Orientation_Morning-Session_Day-11.pdf
JoelVilloso1
 
PPSX
HEALTH ASSESSMENT (Community Health Nursing) - GNM 1st Year
Priyanshu Anand
 
PPT
Talk on Critical Theory, Part II, Philosophy of Social Sciences
Soraj Hongladarom
 
PPTX
How to Set Maximum Difference Odoo 18 POS
Celine George
 
PPTX
Pyhton with Mysql to perform CRUD operations.pptx
Ramakrishna Reddy Bijjam
 
PPTX
How to Create a PDF Report in Odoo 18 - Odoo Slides
Celine George
 
PDF
CONCURSO DE POESIA “POETUFAS – PASSOS SUAVES PELO VERSO.pdf
Colégio Santa Teresinha
 
PPTX
Stereochemistry-Optical Isomerism in organic compoundsptx
Tarannum Nadaf-Mansuri
 
PDF
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 - GLOBAL SUCCESS - CẢ NĂM - NĂM 2024 (VOCABULARY, ...
Nguyen Thanh Tu Collection
 
PDF
Isharyanti-2025-Cross Language Communication in Indonesian Language
Neny Isharyanti
 
PPTX
HYDROCEPHALUS: NURSING MANAGEMENT .pptx
PRADEEP ABOTHU
 
PDF
The Different Types of Non-Experimental Research
Thelma Villaflores
 
PDF
The Constitution Review Committee (CRC) has released an updated schedule for ...
nservice241
 
PPTX
Views on Education of Indian Thinkers Mahatma Gandhi.pptx
ShrutiMahanta1
 
PDF
SSHS-2025-PKLP_Quarter-1-Dr.-Kerby-Alvarez.pdf
AishahSangcopan1
 
PPTX
grade 5 lesson matatag ENGLISH 5_Q1_PPT_WEEK4.pptx
SireQuinn
 
PPTX
How to Convert an Opportunity into a Quotation in Odoo 18 CRM
Celine George
 
PDF
People & Earth's Ecosystem -Lesson 2: People & Population
marvinnbustamante1
 
PDF
Chapter-V-DED-Entrepreneurship: Institutions Facilitating Entrepreneurship
Dayanand Huded
 
PPTX
THE TAME BIRD AND THE FREE BIRD.pptxxxxx
MarcChristianNicolas
 
ARAL-Orientation_Morning-Session_Day-11.pdf
JoelVilloso1
 
HEALTH ASSESSMENT (Community Health Nursing) - GNM 1st Year
Priyanshu Anand
 
Talk on Critical Theory, Part II, Philosophy of Social Sciences
Soraj Hongladarom
 
How to Set Maximum Difference Odoo 18 POS
Celine George
 
Pyhton with Mysql to perform CRUD operations.pptx
Ramakrishna Reddy Bijjam
 
How to Create a PDF Report in Odoo 18 - Odoo Slides
Celine George
 
CONCURSO DE POESIA “POETUFAS – PASSOS SUAVES PELO VERSO.pdf
Colégio Santa Teresinha
 
Stereochemistry-Optical Isomerism in organic compoundsptx
Tarannum Nadaf-Mansuri
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 - GLOBAL SUCCESS - CẢ NĂM - NĂM 2024 (VOCABULARY, ...
Nguyen Thanh Tu Collection
 
Isharyanti-2025-Cross Language Communication in Indonesian Language
Neny Isharyanti
 
HYDROCEPHALUS: NURSING MANAGEMENT .pptx
PRADEEP ABOTHU
 
The Different Types of Non-Experimental Research
Thelma Villaflores
 
The Constitution Review Committee (CRC) has released an updated schedule for ...
nservice241
 
Views on Education of Indian Thinkers Mahatma Gandhi.pptx
ShrutiMahanta1
 
SSHS-2025-PKLP_Quarter-1-Dr.-Kerby-Alvarez.pdf
AishahSangcopan1
 
grade 5 lesson matatag ENGLISH 5_Q1_PPT_WEEK4.pptx
SireQuinn
 
How to Convert an Opportunity into a Quotation in Odoo 18 CRM
Celine George
 
People & Earth's Ecosystem -Lesson 2: People & Population
marvinnbustamante1
 
Chapter-V-DED-Entrepreneurship: Institutions Facilitating Entrepreneurship
Dayanand Huded
 
THE TAME BIRD AND THE FREE BIRD.pptxxxxx
MarcChristianNicolas
 

Eclipse tutorial

  • 1. i
  • 2. i AbouttheTutorial Eclipse is an integrated development environment (IDE) for Java and other programming languages like C, C++, PHP, and Ruby etc. Development environment provided by Eclipse includes the Eclipse Java development tools (JDT) for Java, Eclipse CDT for C/C++, and Eclipse PDT for PHP, among others. This tutorial will teach you how to use Eclipse in your day-2-day life while developing any software project using Eclipse IDE. We will give special emphasis on Java project. Audience This tutorial has been prepared for beginners to help them understand basic functionality of Eclipse tool. After completing this tutorial, you will find yourself at a moderate level of expertise in using Eclipse IDE from where you can take yourself to next levels. Prerequisites We assume you are going to use Eclipse IDE to handle all levels of Java projects development. So it will be good if you have knowledge of software development using any programming language specially Java programming. Copyright&Disclaimer © Copyright 2015 by Tutorials Point (I) Pvt. Ltd. All the content and graphics published in this e-book are the property of Tutorials Point (I) Pvt. Ltd. The user of this e-book can retain a copy for future reference but commercial use of this data is not allowed. Distribution or republishing any content or a part of the content of this e-book in any manner is also not allowed without written consent of the publisher. We strive to update the contents of our website and tutorials as timely and as precisely as possible, however, the contents may contain inaccuracies or errors. Tutorials Point (I) Pvt. Ltd. provides no guarantee regarding the accuracy, timeliness or completeness of our website or its contents including this tutorial. If you discover any errors on our website or in this tutorial, please notify us at [email protected]
  • 3. Eclipse ii TableofContents About the Tutorial....................................................................................................................................i Audience..................................................................................................................................................i Prerequisites............................................................................................................................................i Copyright & Disclaimer.............................................................................................................................i Table of Contents....................................................................................................................................ii 1. OVERVIEW...........................................................................................................................1 What is Eclipse? ......................................................................................................................................1 Licensing .................................................................................................................................................1 Eclipse Releases ......................................................................................................................................1 2. INSTALLATION .....................................................................................................................3 Downloading Eclipse ...............................................................................................................................3 Installing Eclipse......................................................................................................................................3 Launching Eclipse ....................................................................................................................................4 3. EXPLORE WINDOWS............................................................................................................5 Parts of an Eclipse Window .....................................................................................................................5 Using Multiple Windows .........................................................................................................................6 4. EXPLORE MENUS.................................................................................................................7 Typical Eclipse Menus .............................................................................................................................7 Brief Description of Menus......................................................................................................................8 Customizing Menus.................................................................................................................................8 5. EXPLORE VIEWS...................................................................................................................9 About Views............................................................................................................................................9 Organizing Views.....................................................................................................................................9 Moving Views..........................................................................................................................................9
  • 4. Eclipse iii Creating View Folders ...........................................................................................................................10 Opening a view .....................................................................................................................................10 6. PERSPECTIVES ...................................................................................................................13 What is a Perspective? ..........................................................................................................................13 Opening a Perspective...........................................................................................................................13 Switching between Perspectives ...........................................................................................................13 Closing a Perspective.............................................................................................................................14 Customizing a Perspective.....................................................................................................................14 7. WORKSPACES....................................................................................................................16 About Eclipse Workspace......................................................................................................................16 UI Elements for Managing the Workspace ............................................................................................16 8. CREATE JAVA PROJECT ......................................................................................................18 Opening the New Java Project wizard ...................................................................................................18 Using the New Java Project wizard........................................................................................................18 Viewing the Newly Created Project.......................................................................................................20 9. CREATE JAVA PACKAGE .....................................................................................................21 Opening the New Java Package wizard..................................................................................................21 Using the New Java Package Wizard .....................................................................................................21 Viewing the Newly Created Package .....................................................................................................22 10. CREATE JAVA CLASS...........................................................................................................23 Opening the New Java Class Wizard......................................................................................................23 Using the New Java Class Wizard ..........................................................................................................23 Viewing the Newly Created Java class...................................................................................................24 11. CREATE JAVA INTERFACE...................................................................................................25 Opening the New Java Interface Wizard................................................................................................25
  • 5. Eclipse iv Using the New Java Interface Wizard ....................................................................................................25 Viewing the Newly Created Java Interface ............................................................................................26 12. CREATE XML FILE...............................................................................................................27 Opening the New XML File wizard.........................................................................................................27 Using the New XML File wizard .............................................................................................................28 Viewing the Newly Created XML File.....................................................................................................29 13. JAVA BUILD PATH ..............................................................................................................30 Setting the Java Build Path....................................................................................................................30 14. RUN CONFIGURATION.......................................................................................................31 Creating and Using a Run Configuration................................................................................................31 15. RUNNING A PROGRAM......................................................................................................33 Running a Java Program........................................................................................................................33 16. CREATE JAR FILES ..............................................................................................................35 Opening the Jar File wizard ...................................................................................................................35 Using the Jar File wizard........................................................................................................................35 17. CLOSE PROJECT .................................................................................................................37 Why Close a Project?.............................................................................................................................37 How to Close a Project? ........................................................................................................................37 Closed Project in Package Explorer........................................................................................................38 18. REOPEN PROJECT ..............................................................................................................39 Reopening a Closed Project...................................................................................................................39 19. BUILD PROJECT..................................................................................................................40 Building a Java Project ..........................................................................................................................40 20. DEBUG CONFIGURATION...................................................................................................42
  • 6. Eclipse v Creating and Using a Debug Configuration............................................................................................42 21. DEBUGGING A PROGRAM..................................................................................................44 Debugging a Java Program ....................................................................................................................44 22. PREFERENCES....................................................................................................................48 Setting Preferences ...............................................................................................................................48 23. CONTENT ASSIST ...............................................................................................................50 Using Content Assist..............................................................................................................................50 24. QUICK FIX ..........................................................................................................................52 Using Quix Fix........................................................................................................................................52 25. HOVER HELP......................................................................................................................54 Using Hover Help...................................................................................................................................54 26. SEARCH MENU ..................................................................................................................56 Searching the Workspace......................................................................................................................56 27. NAVIGATION......................................................................................................................58 Navigating the Eclipse Workspace.........................................................................................................58 Open Type.............................................................................................................................................58 Open Type in Hierarchy.........................................................................................................................60 Open Resource......................................................................................................................................61 28. REFACTORING ...................................................................................................................63 Refactoring using Eclipse.......................................................................................................................63 29. ADD BOOKMARKS..............................................................................................................64 About Bookmarks .................................................................................................................................64 Adding a Bookmark...............................................................................................................................64 Opening the Bookmarks View ...............................................................................................................64
  • 7. Eclipse vi Using the Bookmarks View....................................................................................................................65 30. TASK MANAGEMENT.........................................................................................................66 Managing Tasks.....................................................................................................................................66 Opening the Tasks View ........................................................................................................................67 Using the Tasks View.............................................................................................................................67 31. INSTALL PLUGINS...............................................................................................................69 Locating and Installing Plug-ins .............................................................................................................69 32. CODE TEMPLATES..............................................................................................................73 Using Code Templates...........................................................................................................................73 Modifying/Adding code templates........................................................................................................74 33. SHORTCUTS.......................................................................................................................75 About Shortcuts ....................................................................................................................................75 34. RESTART OPTION...............................................................................................................78 Restarting Eclipse..................................................................................................................................78 35. TIPS & TRICKS....................................................................................................................79 36. WEB BROWSERS................................................................................................................81 Internal Web Browser...........................................................................................................................81
  • 8. Eclipse 7 WhatisEclipse? In the context of computing, Eclipse is an integrated development environment (IDE) for developing applications using the Java programming language and other programming languages such as C/C++, Python, PERL, Ruby etc. The Eclipse platform which provides the foundation for the Eclipse IDE is composed of plug- ins and is designed to be extensible using additional plug-ins. Developed using Java, the Eclipse platform can be used to develop rich client applications, integrated development environments, and other tools. Eclipse can be used as an IDE for any programming language for which a plug-in is available. The Java Development Tools (JDT) project provides a plug-in that allows Eclipse to be used as a Java IDE, PyDev is a plugin that allows Eclipse to be used as a Python IDE, C/C++ Development Tools (CDT) is a plug-in that allows Eclipse to be used for developing application using C/C++, the Eclipse Scala plug-in allows Eclipse to be used an IDE to develop Scala applications and PHPeclipse is a plug-in to eclipse that provides complete development tool for PHP. Licensing Eclipse platform and other plug-ins from the Eclipse foundation is released under the Eclipse Public License (EPL). EPL ensures that Eclipse is free to download and install. It also allows Eclipse to be modified and distributed. EclipseReleases Every year, since 2006, the Eclipse foundation releases the Eclipse Platform and a number of other plug-ins in June. Codename Year Platform Version Callisto 2006 3.2 Europa 2007 3.3 Ganymede 2008 3.4 1. OVERVIEW
  • 9. Eclipse 8 Galileo 2009 3.5 Helios 2010 3.6 Indigo 2011 3.7 Juno 2012 3.8 and 4.2 Kepler 2013 4.3 Luna 2014 4.4.0
  • 10. Eclipse 9 DownloadingEclipse You can download eclipse from http://www.eclipse.org/downloads/. The download page lists a number of flavors of eclipse. The capabilities of each packaging of eclipse are different. Java developers typically use Eclipse Classic or Eclipse IDE for developing Java applications. The drop down box in the right corner of the download page allows you to set the operating system on which eclipse is to be installed. You can choose between Windows, Linux and Mac. Eclipse is packaged as a zip file. InstallingEclipse To install on windows, you need a tool that can extract the contents of a zip file. For example you can use:  7-zip  PeaZip  IZArc Using any one of these tools, extract the contents of the eclipse zip file to any folder of your choice. 2. INSTALLATION
  • 11. Eclipse 10 LaunchingEclipse On the windows platform, if you extracted the contents of the zip file to c:, then you can start eclipse by using c:eclipseeclipse.exe When eclipse starts up for the first time it prompts you for the location of the workspace folder. All your data will be stored in the workspace folder. You can accept the default or choose a new location.
  • 12. Eclipse 11 If you select "Use this as the default and do not ask again", this dialog box will not come up again. You can change this preference using the Workspaces Preference Page. See the Preference tutorial page for more details.
  • 13. Eclipse 12 PartsofanEclipseWindow The major visible parts of an eclipse window are:  Views  Editors (all appear in one editor area)  Menu Bar  Toolbar An eclipse perspective is the name given to an initial collection and arrangement of views and an editor area. The default perspective is called java. An eclipse window can have multiple perspectives open in it but only one perspective can be active at any point of time. A user can switch between open perspectives or open a new perspective. A perspective controls what appears in some menus and tool bars. 3. EXPLORE WINDOWS
  • 14. Eclipse 13 A perspective has only one editor area in which multiple editors can be open. The editor area is usually surrounded by multiple views. In general, editors are used to edit the project data and views are used to view the project metadata. For example, the package explorer shows the java files in the project and the java editor is used to edit a java file. The eclipse window can contain multiple editors and views but only one of them is active at any given point of time. The title bar of the active editor or view looks different from all the others. The UI elements on the menu bar and tool bar represent commands that can be triggered by an end user. UsingMultipleWindows Multiple Eclipse Windows can be open at the same time. To open a new window, click on the Windows menu and select the New Window menu item. Each window can have a different perspective open in them. For example you could open two Eclipse windows one in the Java perspective and the other in the Debug perspective. The window showing the Java perspective can be used for editing the java code and the window showing the debug perspective can be used for debugging the application being developed.
  • 15. Eclipse 14 TypicalEclipseMenus The typical menus available on the menu bar of an Eclipse window are:  File menu  Edit menu  Navigate menu  Search menu  Project menu  Run menu  Window menu  Help menu 4. EXPLORE MENUS
  • 16. Eclipse 15 Plug-ins can add new menus and menu items. For example when the java editor is open, you will see the Source menu and when the XML editor is open, you will see the Design menu. BriefDescriptionofMenus Menu Name Description File The File menu allows you to open files for editing, close editors, save editor content and rename files. Among the other things, it also allows you to import and export workspace content and shutdown Eclipse. Edit The Edit menu presents items like copy & paste. Source The Source menu is visible only when a java editor is open. It presents a number of useful menu items related to editing java source code. Navigate The Navigate menu allows you to quickly locate resources and navigate to them. Search The Search menu presents items that allow you to search the workspace for files that contain specific data. Project The menu items related to building a project can be found on the Project menu. Run The menu items on the Run menu allow you to start a program in the run mode or debug mode. It also presents menu items that allow you to debug the code. Window The Window menu allows you to open and close views and perspectives. It also allows you to bring up the Preferences dialog. Help The Help menu can be used to bring up the Help window, Eclipse Marketplace view or Install new plug-ins. The about Eclipse menu item gives you version information.
  • 17. Eclipse 16 CustomizingMenus The visible menu items on a menu depend on the installed plug-ins and customization done using the Customize Perspective dialog box.
  • 18. Eclipse 17 AboutViews Eclipse views allow users to see a graphical representation of project metadata. For example the project navigator view presents a graphical representation of the folders and files associated with a project and properties view presents a graphical representation of an element selected in another view or editor. An eclipse perspective can show any number of views and editors. All editor instances appear in a single editor area, whereas views are placed inside view folders. A workbench window can display any number of view folders. Each view folder can display one or more views. OrganizingViews The following picture shows four views arranged in a view folder. The picture given below shows the same four views arranged in two view folders. 5. EXPLORE VIEWS
  • 19. Eclipse 18 MovingViews To move a view from one view folder to another, just click on the view title and drag to the title bar area of another view folder. The green line shown below is a result of dragging the title bar of the Properties view from one view folder to the title bar area of another view folder. The Properties view can be moved to where the green line is by releasing the mouse button and sending out a drop event. CreatingViewFolders View folders can be dynamically created by dragging the title bar of a view to anywhere outside the editor area and title bar of another view folder. As you drag the title bar around, green lines will indicate where exactly the new view folder will be created. Moving the drag icon to the bottom of a window allows you to create a view folder that spans the entire width of the window. Moving the drag icon to the left or right edge of window allows you to create a view folder that spans the entire height of the window.
  • 20. Eclipse 19 Openingaview To open a view, click on the Window menu and select the Show View menu item.
  • 21. Eclipse 20 Clicking on the Other menu item brings up the Show View dialog box that allows you to locate and activate a view.
  • 22. Eclipse 21 The views are organized by category. To quickly locate a view, just type the name of a view into the filter text box. To open a view, select it and click on the OK button. The subsequent pages of this tutorial introduce you to a number of useful views.
  • 23. Eclipse 22 End of ebook preview If you liked what you saw… Buy it from our store @ https://store.tutorialspoint.com