Step 2: Installing Eclipse
Before you install Eclipse, your system must meet a few hardware and software prerequisites, and a couple of additional downloads are recommended. The hardware prerequisites for your machine were outlined in Step 1. The only additional requirements are the software ”you must have a Java runtime environment and a ZIP file utility.
If you have a Macintosh, your Java runtime is built in. For Windows or Linux machines, you need to download one, but they are readily available. To do this, go to Sidestep 1. Also, if you are running Microsoft Windows, I highly suggest the WinZip utility. If you do not already have this program, Sidestep 2 shows you how to get it.
Finally, you can either use the Eclipse SDK version included on the CD-ROM or download the latest version. The release of this book was timed to include the final release of version 2.1 of Eclipse, released on March 28, 2003. Based on when you are reading this book, you may choose to download a later release rather than use the included software. In general, I'd say the CD version will be fine for at least a year (that is, until March 2004). After that (or if you enjoy seeing new features), I would recommend downloading a newer version. Information on downloading Eclipse from the Eclipse Web site is available in Sidestep 3.
Just remember that if you do download a newer version, chances are that there will be minor changes to some of the screens.
Once you've met these initial requirements and decided on which Eclipse version to use, you can continue on.
Step 2.1: Extract Eclipse
The next task assumes a Windows machine with WinZip installed. If you are not running Windows, or if you use another ZIP file extraction program, use the utility of your choice to extract all the files in the ZIP file into the folder C:\Program Files\eclipse (be sure to use subfolders ), and then skip to Step 2.2.
If you don't want to use the folder name C:\Program Files\eclipse, feel free to use your own and modify the instructions that follow accordingly .
q 2.1(a) Using the Windows Start button, start WinZip.
Figure 2.1: Start WinZip from the Windows Start menu.
q 2.1(b) Click the Open button.
Figure 2.2: Open a file using the Open button.
Now, you need to select the file. I will walk you through the steps to open the ZIP file included on the CD-ROM. If, however, you've downloaded a different version of Eclipse using Sidestep 3, you'll need to navigate to that file instead.
q 2.1(c) Select your CD-ROM drive.
Figure 2.3: Select your CD-ROM drive.
q 2.1(d) Open the Software folder.
Figure 2.4: Open the Software folder by double-clicking.
q 2.1(e) Open the Eclipse folder.
Figure 2.5: Open the Eclipse folder by double-clicking.
q 2.1(f) Open the Eclipse SDK ZIP file.
Figure 2.6: Open the SDK ZIP file, eclipse-SDK-2.1-win32.zip, by double-clicking.
You will see the ZIP file contents as shown in Figure 2.7.
Figure 2.7: The WinZip display shown when you open the downloaded SDK ZIP file.
q 2.1(g) Click the Extract button.
Clicking the Extract button will bring up a dialog box that allows you to select a directory to install the ZIP contents into. This dialog will look like the one in Figure 2.9.
Figure 2.8: Click the Extract button to begin installing the SDK files.
Figure 2.9: The WinZip extraction dialog.
You now need to decide where to install this software. I prefer to use "C:\Program Files", because the IDE is after all a program. Everything in the ZIP file is actually in a folder called "eclipse" or one of its subfolders, so after you've finished, you'll see a folder named "eclipse" under "C:\Program Files". Also be sure that the checkbox marked "Use folder names " is checked; otherwise the extract process will not build the required directory structure.
You will need to know the name of this folder for later Steps, particularly Step 4, so I'm going to have you save it.
q 2.1(h) Save the directory name as $ECLIPSEINST: ___________.
q 2.1(i) Enter the value of $ECLIPSEINST as the directory and click Extract.
A status dialog like the one in Figure 2.10 will come up to show you the progress of the extraction.
Figure 2.10: The WinZip extraction status display.
Once this finishes, you have successfully installed Eclipse. Time to run it. First, close WinZip, either by selecting the File menu and then selecting the Exit option or by clicking on the X in the upper right corner of the WinZip window.
q 2.1(j) Close WinZip.
Figure 2.11: Close WinZip by using the X button.