The Eclipse IDE

Eclipse is an open source framework for building IDEs. As it is a Java product the first language plug-in was Java. It is a first rate IDE.

Before getting eclipse, you will have to install the latest JRE (Java Runtime Environment - currently JRE 1.5) from SUN. While you're at it get the Java documentation - currently JSE Documentation 1.5 - and install it as well.

I put everything under Program Files. My directory looks like this when I'm done.

Now go to and download and install eclipse, according to their directions.

Setting Up a Project

First, switch your workspace to whatever directory you are going to keep your own projects in. Here, I've created a Projects directory in Software Design purely for projects associated with this course.

When you hit the OK button, eclipse will actually die. Don't be alarmed, that's by design. It will quickly regenerate itself using the new configuration.

Once you've done that, you can create a new project using the Projects menu. It's pretty straightforward. Generally, it's a good idea to use separate src and bin directories.

Getting the Visual Editor

The Visual Editor is a plug-in for Eclipse that has to be added in separately.

Go to the Help menu and select Software Updates, then Find and Install....

This will take you to one of the Eclipse update websites. Selevt one of them (I find the main site fine as long as it's in the morning).



Pick a site and hit Next>

Now you're going to have to pick the plugins you want from a very large list that looks like this.

Actually, the plug-ins you want are not on this list because I've already installed them on my version. . The installer only offers you stuff you don't have.

You might be tempted to pick something like Visual Editor SDK. It won't hurt your system but that's not what you want (unless you want to become a developer of Visual Editor itself).

You just want the Visual Editor. Actually, there are two other plug-ins you have to install first. I'll show you what they are in a minute but you could just pick Visual Editor. The system won't let you install it and will tell you what you must install first. So install that (once again ignoring SDK's and examples and other extraneous stuff). When you're finished, go through the process again to install the second piece and then a third time to finally install the Visual Editor.

Sort of a pain - but it took me only an hour and a half on a 33K dial-up. Just make sure you do it at a low demand time.


If you want to know what the actual other two pieces are, here are my installed plug-ins.

The other two plug-ins are the Graphical Editing Framework and the Java EMF Model. I'm not sure which has to be installed first (or whether it even matters).

Connecting in JavaDoc for Java

It's really useful to have an online Java reference. If you haven't already done so, get the javaDoc files from sun and load them into your java directory in Program Files as shown above.

Now choose Preferences under the Window menu

Now choose Installed JREs, select jre1.5.0 and hit the Edit... button

Now fill in the Javadoc URL: box by browsing to the docs directory on your drive. Make sure you browse to the api subdirectory or you wan't get anything.

Hit OK and you should be good to go. Now you can put your cursor over something unfamiliar in the Editor window, hit CNTRL F2 and, so long as what you illuminated is part of java the associated javadoc should load into a separate browser window. You might want to keep it open for reference, and learn to navigate around it separately.

Creating a Java Executable

The first step is to create a jar file (Java ARchive). This is basically a zip file containing all your class files, your resources (such as gifs or html pages used for dialog boxes) and a manifest file (which, most importantly, says which class file contains main).

Right click on your project and select Export.... then choose a JAR file

Fill in the wizard form as below. You should export resources from src but not doc. Click Next>

Now you need to specify the manifest. What is most important here is to specify the class that holds your main function. When filled in as below, click Finish.

In Windows XP, open windows explorer, Choose Folder Options... from the Tools menu, switch to the File Types tab and make sure that the JAR extension is associated with the Java 2 platform Standard Edition Binary as shown below.

Then all you should have to do is double click on your jar file to execute it!