4. Running Eclipse
After installing the Eclipse SDK in a directory, you can start the Workbench by running the Eclipse executable included with the release (you also need a 1.4 JRE, not included with the Eclipse SDK). On Windows, the executable file is called eclipse.exe, and is located in the eclipse subdirectory of the install. If installed at c:\eclipse-SDK-3.0-win32, the executable is c:\eclipse-SDK-3.0-win32\eclipse\eclipse.exe. Note: Set-up on most other operating environments is analogous. Special instructions for Mac OS X are listed below.
Depending on the JRE that you are running, the number of plug-ins you are using, and the number of files you will be working with, you may have to increase the amount of memory that is available to the Java VM running Eclipse. Eclipse allows you to pass arguments directly to the Java VM using the -vmargs command line argument, which must follow all other Eclipse specific arguments. To increase the available memory, you would typically use:
eclipse -vmargs -Xmx<memory size>
The <memory size> value should typically be at least "128M" (128 megabytes). Usually, "256M" (256 megabytes) is ample. You should not set this value to be larger than the amount of physical memory on your machine.
When the Workbench is launched, the first thing you see is a dialog that allows you to select where the workspace will be located. The workspace is the directory where your work will be stored. If you do not specify otherwise, Eclipse creates the workspace as a sibling of the executable (that is, at c:\eclipse-SDK-3.0-win32\eclipse\workspace). This workspace directory is used as the default content area for your projects as well as for holding any required metadata. For shared or multi-workspace installs you must explicitly specify the location for your workspace using the dialog (or via the "-data" command line argument).
Here is a typical Eclipse command line:
eclipse -vm c:\jdk1.4.2\jre\bin\javaw -vmargs -Xmx256M
Tip: It's generally a good idea to explicitly specify which Java VM to use when running Eclipse. This is achieved with the "-vm" command line argument as illustrated above. If you don't use "-vm", Eclipse will look on the O/S path. When you install other Java-based products, they may change your path and could result in a different Java VM being used when you next launch Eclipse.
To create a Windows shortcut to an installed Eclipse:
1. Navigate to eclipse.exe in Windows Explorer and use Create Shortcut on the content menu.
2. Select the shortcut and edit its Properties. In the Target: field append the command line arguments.
Opening this shortcut launches Eclipse. (You can drag the shortcut to the Windows Desktop if you want to keep it in easy reach.)