Tutorial: Installing
Eclipse on your Own Computer
By Jonathon Lundy and Ron
Cytron
Eclipse is an
Integrated Development Environment, or IDE,
which is software that provides all the essential tools you will need for
editing, running, and debugging your Java programs. Eclipse and all of the supporting software is already
installed on CEC computers, but you may also wish to install it on your own
computer, so that you are not limited to working only on CEC boxes. (It’s
free!) Versions of the
software are available for all operating systems.
I. Installing the
Java Development Kit (JDK)
Note: Mac users skip to the last part
of this section.
The
Java Development Kit, or JDK, is
a set of development tools used in the programming of Java applications. The Eclipse IDE requires that a JDK be
locally installed. The JDK can be
downloaded from the web at http://java.sun.com/javase/downloads/index.jsp. Under the header Java
SE Development Kit (JDK),
press Download next to the most recent update of JDK 6.
Beware: The CEC computers are configured with JDK 6. You’ll also want to be using a version
of JDK 6, otherwise compatibility issues may occur. If you see that a newer JDK is listed, click the Previous Releases link at the top of the
list of downloads to access JDK 6.
On
the next page select your operating system, agree to the terms, and press
continue to get to the download page.
Download the executable installation file and then run to install. Note that you will need administrator
rights to install.
Mac Users: Mac OS X comes pre-installed
with JDK. To ensure that you have
JDK 6 support, download the appropriate updates from http://developer.apple.com/java/,
where you can also read more about Java for Mac.
II. Installing and
Starting Eclipse
Now
that the Java JDK has been installed, we can now download and run the Eclipse
IDE. First, point your browser to http://www.eclipse.org/downloads/.
Then, under the Eclipse Packages tab, find the listing
for Eclipse IDE for Java Developers. Select your OS and download the
appropriate archive file.
When
the download is finished, extract the archive to a new folder for Eclipse in a
place of your choosing (you’ll probably want to put it in whatever folder
applications are usually stored on your OS). No further installation is required. You may wish to create a shortcut to
the Eclipse executable to place on your desktop/dock so you don’t have to find
the folder you installed it to each time you wish to start Eclipse.
Start
Eclipse. (Note that startup can
take a while!) You will be
prompted during startup to select a folder for your workspace, which is where
your Java files are stored locally.
Select a folder (preferably an empty one) to use as your workspace. The default is usually a good
choice. Select Use this as the default and do not ask again
if you don’t want to be asked this question every time on start-up.
Once
Eclipse has started, you’ll be taken to the Welcome tab. Close this tab to go to the default
Eclipse perspective.
III. Installing
the Subversive Plug-in
Subversive
is a plug-in for Eclipse that allows Eclipse to use Subversion (SVN),
which is a version
control system. Use of this
system will make it easy for you to easily move from your own computer to a CEC
computer, work in groups, and electronically submit your work. However, Eclipse does not support SVN
out of the box; a plug-in is required to make it work. Details on how to use SVN with Eclipse
will be explained in another tutorial; here we will merely install it.
First,
open the Help menu of Eclipse and
choose the Software Updates… option.
(Eclipse 3.5, it’s Help…Install
New Software…)
In
the resulting dialog, go to the Available
Software tab:
The
list of web sites you see contains locations where updates for the Eclipse
software can be found. The files
for the Subversive plug-in are located on two separate, different locations on
the web, both of which we’ll need to check. To add them, press the Add
Site… button. This brings up
another dialog box. (Eclipse 3.5, just paste in the
URL and click Add…)
In
the box, type the address http://download.eclipse.org/technology/subversive/0.7/update-site/. Then press OK. This will add the site to the list on
the previous dialog. Do the same
thing again, but this time use the URL http://www.polarion.org/projects/subversive/download/eclipse/2.0/update-site/. (The first site hosts the actual
Subversive plug-in, while the second site hosts the Subversion adaptors, both
of which are required for Subversive to run). Your Available
Software tab should now look something like this:
If
it doesn’t, check that the URLs were typed properly. Note that if they are correct, they are replaced in the list
by a description of the site when the contents are loaded. Also note that you may need to manually
expand or collapse components by using the plus and minus buttons next to
them. Also, ensure that the Show only the latest versions of available
software check box is checked.
Ensure
that the boxes next to Subversive Site,
Subversive SVN Connectors Site (mac users, see note below), and all of their
children are checked, as shown in the picture above.
We have seen problems when trying to install all of the Subversive SVN Connectors components
on macs. If you experience
problems, go back to the check boxes for the Subversive SVN Connectors. Check the boxes only for the required components
and the SVNKit (latest edition)
component.
Then
press Install…. This will bring up the next dialog.
Ensure
that all boxes are checked, and then press Next.
In
the next dialog box, you will have to accept the license agreements for the
components.
Do
so, and then press finish. The
plug-in will then be downloaded and installed. Note that this process may take a while. When prompted to restart Eclipse, do
so.
Upon
restarting Eclipse, the Welcome screen will appear with a new link entitled Subversive Overview. You may wish to read this, as it will
introduce you to the concepts behind Subversion and the Subversive
plug-in. Details on using
Subversive in CSE131 will be presented in another tutorial.