Install GWT
This chapter explains the steps required to install GWT Plugin for Eclipse.
Software used in the book are
Software | Version | Size (approximate) |
---|---|---|
Eclipse | 4.2 Juno | 220 MB |
Google Plugin for Eclipse (GPE) | 3.2.0 | 60 MB (including any Juno updates) |
GWT Designer for GPE | 20 MB | |
Google Web Toolkit SDK | 2.5.0 | 105 MB |
Google App Engine SDK | 1.7.5 | 90 MB |
Eclipse
Download and install Eclipse Juno 4.2. Preferred Package is Eclipse IDE for Java EE Developers. Other packages should also work but, Java EE package contains many of the dependencies of GWT.
Google Plugin for Eclipse (GPE)
GPE is the base plugin of Google and is required by other development tools and SDK like
Android Developers Tool ADT
GWT Designer for GWT
Google Web Toolkit SDK
Google App Engine Java SDK
To install GPE, Designer and SDK, start Eclipse and go to Help → Install New Software … and it displays Available Softwares window. Enter GPE update site url http://storage.googleapis.com/gwt-eclipse-plugin/v3/release in Work with text box and click Add and then in Add Repository window click Ok. List of available software is displayed as shown in the Figure.
Select Google Plugin for Eclipse, GWT Designer for GPE, Google App Engine Java SDK and Google Web Toolkit SDK. Click Next and complete the installation by going through the dialogs.
Install GPE from archive
Above method works smoothly if the link is stable. Couple of jars, GAE and GWT SDK, are quite large and in case link goes down while they are being downloaded then Eclipse goes for fresh download on retry. Instead, we can manually download these items and install them.
In the previous method, Eclipse installs all the four items (GPE, Designer, GWT SDK and GAE SDK) as plugins either in plugin directory under Eclipse install directory or under $HOME/.eclipse (In case Eclipse install dir, has no write access). This method installs GPE and Designer as plugins and, GWT and GAE SDK as standalone software outside the eclipse and configures the Eclipse to use them.
Steps are as follows.
Download GPE update site zip for Juno from http://dl.google.com/eclipse/plugin/core/4.2/zips/gpe-e42-latest-updatesite.zip.
Download Google Web Toolkit SDK - gwt-2.5.0.zip from http://code.google.com/p/google-web-toolkit/downloads/list .
Down Google App Engine SDK - appengine-java-sdk-1.7.5.zip from http://code.google.com/p/googleappengine/downloads/list . These files may be downloaded either through the browser or wget, with option -c to resume the partially downloaded file.
Start Eclipse Juno and choose Help → Install New Software … to display Available Software window. Click the Add button and in Add Repository window click Archive and browse and select the downloaded GPE zip file.
List of available software, as shown in Figure 1.1, is displayed. Select Google Plugin for Eclipse and GWT Designer for GPE and install the plugins.
Extract gwt-2.5.0.zip to any location of your choice. Go to Windows → Preferences → Google → Web Toolkit. Click the Add button and in pop up dialog browse to select the root dir of extracted GWT SDK and click OK button. This configures Eclipse to use GWT SDK.
Extract appengine-java-sdk-1.7.5.zip to any location. Go to Windows → Preferences → Google → App Engine. Click the Add button and in pop up dialog browse and select the root dir of extracted App Engine SDK and click OK button. This configures Eclipse to use App Engine SDK.
GPE plugin adds Google Pulldown menu to the toolbar.
GWT StockWatcher Tutorial
Official GWT documentation comes with an excellent tutorial which explains the GWT concepts in easy and clear steps. If you are new to GWT, then it is a prerequisite to cover the first part of the StockWatcher tutorial as this book does not explain the basics of GWT. StockWatcher Tutorial is available at Build a Sample GWT Application
Forward Pointers
Install - For installation details refer Google Plugin for Eclipse 4.2(Juno) Installation Instructions.
Install from zip - To install from local updatesite archive refer Installing the Google Plugin for Eclipse from a local update archive.