1.gxt2.0 与gwt2 不兼容,若要使用gwt2 需要下载gxt 2.1.0
2.将gxt examples导入到工作空间,导入方法如下:源码以文件夹的形式拷入,其他的文件拷贝岛war里面,如图
3.在eclipse 内为 gwt 做单元测试:
可以直接在src目录内新建一个继承 GWTTestCase 的类,需要实现getModuleName方法返回模块中除去gwt.xml外的包全名,如:net.3322.gwt.MyGwt
另外第一次允许junit的时候会出错,这时候设置一下junit运行时的classpath,将src目录加到classpath里面去,步骤如下:
- click the Classpath tab
- select User Entries
- click the Advanced button
- select the Add Folders radio button
- add your src and test directories
注:照理说test目录内的TestCase也是可以的,但是我在test目录内的TestCase运行出错,所以只好放到src目录里面去了