现在的位置: 首页 > 综合 > 正文

gwt的部署

2013年09月06日 ⁄ 综合 ⁄ 共 962字 ⁄ 字号 评论关闭

一、 安装 Cypal Studio工具

a.下载 Cypal Studio http://code.google.com/p/cypal-studio/ ,解压后得到四个jar包 Copy到 Eclipse/plugins目录下。 
b.下载gwt 的安装包 http://code.google.com/webtoolkit/download.html,解压到一定的目录下,例:c:C:\Program Files\gwt目录下. 
c: 配置 GWT Home目录,打开 Eclipse的 Window—Preferences—Cypal Studio 选择 Gwt的目录。 
二、 建立一个名为 gwtext的 GWT项目 

a.    新建一个动态 web项目, File—New—Other—Web—Dynamic Web Project,在 Configurations中选择 Cypal Studio GWT Project,其他的默认即可。 

三、 创建 Module模型 

a.  gwtext项目上点击右键 New—Other—Cypal Studio—Module,输入包名 org.gwtext.julycn,类名 Register。 

b.  在 com.gwtext.julycn包下面生产 client包、 server包、 public目录和 Register.gwt.xml、 Register.html; 

c.       在 Register.java的 onModuleLoad() 方法中加入 Window.alert("This is my first Gwt Demo!"); 

Java代码 

   
public class Register implements EntryPoint {   
    public void onModuleLoad() {   
            Window.alert("This is my first Gwt Demo!");   
        ,不只是活着;}   
}   

d.      选择 Run—Open Run Dialog—Gwt Hosted Mode Application,选择 New,新建一个运行实例 gwtext,在 Project中选择 gwtext, Module会自动选择所要运行的模型类。 
e.      点击运行,会弹出 Google Web Toolkit运行窗口。

抱歉!评论已关闭.