一般我们首先要通过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开发了
分享到:
相关推荐
从研发经验总结的smartGwt的开发与实现
关于GWT开发详解,感兴趣的朋友还是很值得一看。
GWT-Ext 是基于 Google Web Toolkit(GWT)和 ExtJs 的功能强大的网页开发控件库。它非常适用于进行纯 Java 语言的富 Internet 应用的快速开发。本系列文章将详细讲解 GWT-Ext 的基本结构和功能特点,并通过代码示例...
该文档是关于在eclipse下进行GWT开发的一个教程文档,与网上其他教程有所区别,此文档为中级篇,建议用户先下载基础篇浏览过后再决定是否下载另外两篇~~
该文档是关于在eclipse下进行GWT开发的一个教程文档,与网上其他教程有所区别,此文档为基础篇,还有进阶和中级篇,建议用户先下载基础篇浏览过后再决定是否下载另外两篇~~
面向 Java 开发人员的 Ajax: Google Web Toolkit 入门 图文教程
(本文基于GWT提供的开发指南(Developer Guide),所采用的图片,例子均出自GWT,可以认为是GWT的学习笔记) GWT的核心是通过一个编译器(compiler)把Java代码翻译为JavaScript代码,开发期间,用户以类似开发AWT...
不用为界面烦恼了。使用JAVA语言开发WEB
谷歌师兄的leetcode刷题笔记 网达 可组合的无服务器 API 目标 我的服务器供我个人使用已经运行了 10 多年,因为我希望很少有网站和 API 在线,但大多数时间这些服务器都在等待。 然后是Lambda ,AWS 提供的非常酷的...
为此,我们首先计划开发一个强大的平台,该平台利用事务处理管理、模块化系统架构以及在 Java Web 接口(例如 JPA 和 GWT)的持久性管理和开发中使用最新技术的优势。 凭借获得的结果,我们假装支持小额信贷评估员...