Wednesday, June 13, 2007

Install Eclipse G.W.T.

download and unzip the Google Web Toolkit itself and you’re ready to create your first project.

Note: Right now there are no Eclipse plug-ins to create a GWT project so you have to do some manual steps at this point. Hopefully that void will be filled soon.

At a command prompt, run these commands (Substitute the appropriate paths for your system):

cd c:\gwt-projects
mkdir MyProject
cd MyProject
projectCreator -eclipse MyProject (cd c:\working\gwt-projects\ | appropriate path of projectCreator)
applicationCreator -eclipse MyProject \

The projectCreator and applicationCreator commands are two shell scripts that are supplied as part of GWT, so you’ll need to specify the path to them or add the GWT directory to your system PATH variable. "MyProject" and "MyApplication" are just example names; you can use anything you want.

Now start up Eclipse and import this project into your workspace (File > Import > Existing Projects Into Workspace). The project will build and if all is successful you will end up with something like this:


If you follow Google’s Getting Started instructions it says to just click on the green "Run" button to get your project started in "hosted" mode, but that’s not quite correct. Plus, you’ll want to run the program in Debug mode most of the time anyway. So select Run > Debug…, and click on the launch configuration titled MyApplication (under Java Application). Then click on Debug. Two windows will appear: The GWT Development Shell (this is kind of like a console window) and the Wrapper HTML window (a special web browser).