Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
An Introduction to Eclipse:
Quick Guide
• Creating a Project
• Creating a Class
• Running a Project
• Navigating Projects
Installation and Running
• Eclipse: https://www.eclipse.org/downloads/packages/
• Run:
• windows: eclipse.exe
Projects &
Classes
Editor
Methods &
Attributes
Output
Creating a New Project
1
3
Creating a Class
1 2
[right-click]
Navigate to ProjectName/bin
folder to execute
If your project is packaged then
from bin use “java packageName/
className” to execute
Navigating Projects
Selecting an item in one view brings it into focus in the other views
Part 2: Working with Eclipse
• Creating Packages
• Debugging
• Refactoring
• Creating jars
• Runtime errors can be traced from Console to the guilty line of code in Editor:
• [right-click] on project
• Runnable JAR (source code omitted, but includes externally referenced libraries)
• Export > Java > Runnable JAR File > Next Extract: external JARs will be
extracted and the class files put/mixed
• Select Launch Configuration: ‘Extract External Files’ together with your class files
• View the TODO list using the Tasks view, NOT the Task
List view
• Commit Changes
• Revert Changes
https://github.com/collab-uniba/
socialcde4eclipse/wiki/How-to-import-a-
GitHub-project-into-Eclipse
Adding, Moving and Removing Content
• Move File:
• [select-and-drag] as apt
• Delete File:
• [right-click] on file > Delete
2
Changes: Add to Index then Commit
1 2
3
Revert Changes (Locally)
Revert Changes (from Repository)
1
2
• delete the local copy of the project from your Eclipse workspace
• try having a couple of team members simultaneously make changes (to different classes) in the
project
Useful Online Guides
(which also form the reference materials for this guide)
• http://www.vogella.de/articles/Eclipse/article.html
• http://www.ibm.com/developerworks/library/os-ecbug/
• http://help.eclipse.org/indigo/index.jsp