Recipe 1.2 Installing and Running Eclipse

     

1.2.1 Problem

You want to install Eclipse and get it running on your machine.

1.2.2 Solution

After you've downloaded it, installing Eclipse is not hard: unzip or untar the Eclipse download, and you're ready to go. Because you've downloaded the version of Eclipse targeted to your operating system, you'll find the executable file as soon as you uncompress Eclipse. To run Eclipse, just run that executable file.

1.2.3 Discussion

One of the great things about Eclipse is the ease with which you can install it. Wherever you unzip or untar it is its home. You also can have parallel installations of Eclipse; just decompress it in the various directories you want and run the executable file, such as eclipse.exe .

Users of big, invasive IDEs will appreciate the fact that Eclipse installs quickly, does not require multiple reboots, and does not include hidden spyware. Windows developers will be relieved to learn that Eclipse does not install itself in the Windows registry, with all the attendant problems that can cause. So, (re)installation is painless.

When you first run Eclipse, you'll see the Resource perspective by default, as shown in Figure 1-2. As discussed in the Recipe 1.6 later in this chapter, a perspective presents an arrangement of windows to the user . If you open a particular perspective over and over, you'll always get the same set of windows. The Resource perspective is a general perspective that is good for resource management, particularly file handling. But we're not going to work with it here because everything we need, including virtually all functionality that the Resource perspective offers, is in the Java-oriented perspectives, particularly the Java perspective, discussed later in this chapter.

The Resource perspective doesn't have to be your default perspective. Select Window Preferences Workbench Perspectives to choose a default perspective. Java programmers often select the Java perspective here, which is the main perspective for Java development.


Figure 1-2. The Resource perspective
figs/ecb_0102.gif

You must have Java installed on your machine to start Eclipse. If you start Eclipse for the first time and see a dialog box with a message beginning with the sentence "A Java Runtime Environment (JRE) or Java Development Kit (JDK) must be available in order to run Eclipse," download and install Java first. You can get Java for free at http://java.sun.com/j2se/.


After installing Eclipse, you can make it easier to run by connecting a shortcut to it. In Linux or Unix, add the Eclipse directory to your path , or use ln -s to create a symbolic link to the Eclipse executable. In Windows, right-click the executable file in Windows Explorer and select Create Shortcut from the context menu that opens, then drag the new shortcut where you want it.

Speeding Up Startup

In general, Eclipse starts fairly slowly, but you can improve startup performance (if you're an Eclipse novice, you might want to wait on this until you have more experience). Startup is often slow because of the number of things Eclipse has to do. To speed up the startup process, reduce the number of plug-ins you have, close views and editors before quitting Eclipse, and remove unessential projects from the workspace. You can even fine-tune the Java virtual machine (JVM) that Eclipse uses. For example, you can give it more memory with a startup argument such as -vmargs -Xmx512m , which gives the JVM 512 MB of memory to work with, eliminating a lot of swapping to disk.


1.2.4 See Also

Recipe 1.6 on perspectives, views, and editors; Recipe 1.3 on understanding the Eclipse workspace; Chapter 1 of Eclipse (O'Reilly).



Eclipse Cookbook
Inside XML (Inside (New Riders))
ISBN: 596007108
EAN: 2147483647
Year: 2006
Pages: 232
Authors: Steve Holzner

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net