Tuesday, September 29, 2015

How to create GWT module using Eclipse

1- Lets first create inbuild plugin GWT Project i.e. CreateGWTModule

2- Click on Project CreateGWTModule in project explore

2.1- Right Click on Project

2.2- Click on other - Go to Google Web tool kit and click on Module

2.3- Click next and fill the information

2.4- Click finish

our Module Project xml will be like below
<-- encoding="”UTF-8″?" version="”1.0″" xml="">
<--!DOCTYPE module PUBLIC “-//Google Inc.//DTD Google Web Toolkit 2.6.0//EN” “http://google-web-toolkit.googlecode.com/svn/tags/2.6.0/distro-source/core/src/gwt-module.dtd”&gt;
<--inherits name=”com.google.gwt.user.User” />
<--source path=”client”/>
3- Our project will look like below

4- Create a java class

public class TestMyClass {
private String firstName;

public String getFirstName() {
return firstName;

public void setFirstName(String firstName) {
this.firstName = firstName;

5- In our project GWT make following line changes by importing the newly created project
public void onModuleLoad() {
TestMyClass p = new TestMyClass();
Label label = new Label("Hello " + p.getFirstName());

6- Run the project and see the result

No comments: