Friday, July 3, 2009

GWT + Google App Engine@Eclipse x Google Eclipse Plug-in

With Eclipse (3.3 or 3.4) and Google Eclipse Plug-in, you can develope GWT, compile and debug, also deploy to Google App Engine, in one IDE environment.

Eclipse 3.5(Galileo) was just announced, but it is not yet supported by the Google Eclipse Plug-in.

In this article, I will describes how to install Eclipse with Google Eclipse Plug-in, develope (generate) a very basic hello web application, and also deploy to Google App Engine.

Setup:
Ubuntu Linux 9.04
Eclipse Ganymede SR2 Packages
libstdc++5

In order to run Google Web Application, you need to install libstdc++5 also. To Install libstdc++5, type the following in Terminal:
sudo apt-get install libstdc++5

To download Eclipse of older version, Eclipse 3.3(Europa)/Eclipse 3.4(Ganymede), visit the link:
http://wiki.eclipse.org/Older_Versions_Of_Eclipse

Select Eclipse Ganymede SR2 Packages
Download Linux 32bit version of Eclipse IDE for Java Developers, save and extract to any location you want, say "eclipse" at your home.

Start Eclipse and install the Plug-in:

To install Google Eclipse Plug-in, start Eclipse, click Help>Software Updates


add the site:
http://dl.google.com/eclipse/plugin/3.4 (http://dl.google.com/eclipse/plugin/3.3 if the eclipse you installed is 3.3)



Select Google Update Site for Eclipse 3.4, and click Install and continues the following steps.

Accept the terms of license agreements and Finish...

After install, you will be asked to re-start Eclipse.

You can develope Web Application after Eclipse restarted:
Click File on the toolbar, -> New -> Web Application Project

Enter your Project name and Package in the setup page.

A dummy hello Web Application is prepared for you, right click your project, Debug As -> Web Application,

you can see your project started in loal host.

Before you can deploy, you have to register a Appliation-ID from Google:
http://code.google.com/appengine/

To deploy to Google App Engine, right click yout project, Google -> Deploy to App Engine

In the deploy dialog, click App Engine project setting..

Enter your Application-ID, and click OK return to deploy dialog.

Enter your google account email and password in the deploy dialog, and click deploy.

After Deployment completed successfully, you can see your first Web Appliation on line.

It's my first Web Application:
http://g-buddy.appspot.com/