Sunday, October 23, 2011

How To Create A Website Using Google Web Toolkit And App Engine

Install Sun Java JRE and JDK:

  • Installing Sun Java from the command line

$sudo apt-get install sun-java6-jre sun-java6-bin sun-java6-jdk sun-java6-plugin sun-java6-fonts

  • Choosing the default Java to use

$sudo update-alternatives --config java

  • Then, choose Sun Java

Download and install Eclipse:

  • Choose Eclipse IDE for Java EE Developers.

Set-up JDK in Eclipse:

  • Window->Preferences->Java->Installed JREs.
  • Click Add, Standard VM->JRE Home, click Directory and choose:
/usr/lib/jvm/java-6-sun, then click Finish.
  • Check java-6-sun.

Install Google Web Toolkit and Google App Engine Plug-ins:

  • Help->Install New Software->Click Add, and Use this URL To Download:

  • To install GWT, use this URL:

Now, that everything have been set-up, create a new project:
  • First, you must have a Google Account using Google App Engine.
  • Then, sign-in in Eclipse at the bottom left.
  • In Eclipse, File->New->Web Application Project.
  • Fill-in Project Name and Package, click Finish.
  • Right-click on the created project in the Project Explorer->Google->Deploy to App Engine (This may take awhile).
  • To run the web app, right-click the project->Debug As->Web Application.

You will see a link to launch a web browser. You need to install Google Chrome for debugging, and install the Chrome Web Toolkit Plugin.

  • Add the Browser: Window->Preferences->General->Web Browser. Chrome is located here: /usr/bin/google-chrome.
  • Double-click the link when debugging, then run Chrome.

You will see it's default web application.  

Here's the link on how to Set-up Eclipse for Google Web Toolkit:

Next blog post, we'll do some coding.

No comments: