`
huangchao200701
  • 浏览: 58665 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

GWT开发笔记

阅读更多
一般我们首先要通过projectCreator 命令工具来建立一个eclipse项目:
1。Create an Eclipse project with projectCreator

If you're using Eclipse, the first utility you'll run is
projectCreator (if you're not using Eclipse, skip ahead to the section on applicationCreator). The projectCreator utility will generate a shell Eclipse project for our application. Open a command shell and browse to the StockWatcher directory you created. Run the command:

projectCreator -eclipse StockWatcher -out StockWatcher

After the projectCreator utility runs, you should see that it has generated a new directory called StockWatcher containing a couple of subdirectories (src and test for storing the project source code and unit tests) and a pair of Eclipse files (.project and .classpath).

2。Create a GWT project with applicationCreator

Next we're going to use the applicationCreator  utility to generate a minimal but functional GWT project. We'll need to pass it the fully-qualified name of our application's main entry point class. Based on the
recommended GWT project structure , this class should always be in a subpackage client. For our StockWatcher application we'll name our main class com.google.gwt.sample.stockwatcher.client.StockWatcher.

The applicationCreator utility can also generate Eclipse launch config files for easy hosted mode debugging. Just specify the -eclipse flag followed by the name of your Eclipse project.
In a command shell, browse to the StockWatcher directory. If you're using Eclipse, run the command:
applicationCreator -eclipse StockWatcher -out StockWatcher com.google.gwt.sample.stockwatcher.client.StockWatcher
If you're using another IDE, omit the -eclipse flag and project name:
applicationCreator -out StockWatcher  com.google.gwt.sample.stockwatcher.client.StockWatcher
Now take a look inside the StockWatcher directory. You'll see that the applicationCreator has generated two scripts for us named StockWatcher-compile and StockWatcher-shell. These scripts will help us prepare StockWatcher for deployment, or run the application in hosted mode
, respectively.

3。Import the project into Eclipse
这样的话就可以在eclipse下,进入java代码开发,从而大大优于以往的js开发了
分享到:
评论
1 楼 zht110227 2009-06-30  
我怎么没有看到你说的那些命令,最新的版本的1.6.4

相关推荐

Global site tag (gtag.js) - Google Analytics