Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

ITECH2306 AGILE CODING

Additional Resource for Lab work


Using Eclipse as an IDE for Java Development
This is an introductory guide for ITECH2306 students explaining the basics of using Eclipse IDE to
develop Java program code. Eclipse is an IDE (Integrated Development Environment) in which you
can develop and test your program code. You can download the latest version of Eclipse from
http://www.eclipse.org for free. Select “Eclipse IDE for Java Developers” from the installation options
to install a version of Eclipse with git included. You must also have the Java Development Kit (JDK)
installed on your computer. You can download Java SE (Standard Edition) from www.oracle.com.
Eclipse is also described in your text book in Chapter 2 Section 7 pages 20 - 28

Starting Eclipse
When you download Eclipse, the executable file can be stored anywhere on your computer (you are
not forced to save it in My Programs. It is probably helpful to create a desktop shortcut and/or taskbar
shortcut to your eclipse application so that you can find it easily.
To find where Eclipse is stored on your computer, you can type ‘Eclipse’ into the Search window
accessed by clicking on the windows icon on the bottom left of your task bar.

The most recent version (in February 2018) of Eclipse is Eclipse Oxygen, however, you may still use
older versions successfully. The Labs at Mt Helen have Eclipse Mars installed.

CRICOS Provider No. 00103D Using Eclipse IDE Page 1 of 5


Using Eclipse
Eclipse allows us to create projects and organise our Java code. When you start Eclipse, you need to
have a workspace that you will use. This refers to the default folder where all your code will be stored
on your computer. If you are using a public computer, you want to use a folder in a place that you can
access again (e.g. a university network drive, or a USB).
Within Eclipse, when we create a Java project, we also create Java packages. Packages are
described in your text from page 16.

When you start up Eclipse, you first see a welcome screen. The welcome screen for Eclipse Oxygen
is shown below:

To begin to work, you need to close the welcome screen and open the workbench.

CRICOS Provider No. 00103D Using Eclipse IDE for Java Page 2 of 5
Click on restore icon on top left to view the workbench in Eclipse. Then change the perspective to
Java. In the screen shot below, the welcome screen for Eclipse Mars is shown.

Click here to restore the workbench

Click to change the perspective to Java if necessary.


(Note in the screenshot below, Eclipse is already in Java Perspective. Java-Eclipse is displayed on the
top left of the window)

CRICOS Provider No. 00103D Using Eclipse IDE for Java Page 3 of 5
The Java Perspective in Eclipse
The Eclipse Java perspective window displays your existing projects and packages in the left window titled
Package Explorer and displays your code in the middle window.

CRICOS Provider No. 00103D Using Eclipse IDE for Java Page 4 of 5
Creating a project locally in Eclipse
First, create a new Java Project in Eclipse:

Give your project a name (for example ‘HelloWorld’) and click Finish:

You can now start developing your project by adding packages, classes, and so on.

Read your text book for more information.

CRICOS Provider No. 00103D Using Eclipse IDE for Java Page 5 of 5

You might also like