STEP 1 Download GWT SDK
$ source /etc/profile
STEP 3 webAppCreator
prayag@prayag:~/workspace_gwt$ webAppCreator -junit /home/prayag/.m2/repository/junit/junit/3.8.1/junit-3.8.1.jar -out gwitter com.zam.gwitter.GwitterModule
[ NOTE : GwitterModule*.launch are launch configurations for Eclipse depending on application modes.]
STEP 4 Run an app in dev mode
Buildfile: /home/prayag/workspace_gwt/gwitter/build.xml
Download gwt sdk at https://developers.google.com/web-toolkit/gettingstarted
STEP 2 Configure PATH
update profile as follows:
PATH=$PATH:/opt/gwt250RC2/gwt-2.5.0.rc2/
export PATH
$ source /etc/profile
STEP 3 webAppCreator
prayag@prayag:~/workspace_gwt$ webAppCreator -junit /home/prayag/.m2/repository/junit/junit/3.8.1/junit-3.8.1.jar -out gwitter com.zam.gwitter.GwitterModule
Generating from templates: [sample, eclipse, readme, _eclipse-test, _sample-test, ant]
Created directory gwitter
Created directory gwitter/src
Created directory gwitter/src/com/zam/gwitter
Created directory gwitter/src/com/zam/gwitter/client
Created directory gwitter/src/com/zam/gwitter/server
Created directory gwitter/src/com/zam/gwitter/shared
Created directory gwitter/test
Created directory gwitter/test/com/zam/gwitter
Created directory gwitter/war
Created directory gwitter/war/WEB-INF
Created directory gwitter/test/com/zam/gwitter/client
Created file gwitter/src/com/zam/gwitter/GwitterModule.gwt.xml
Created file gwitter/src/com/zam/gwitter/client/GreetingService.java
Created file gwitter/src/com/zam/gwitter/client/GreetingServiceAsync.java
Created file gwitter/src/com/zam/gwitter/client/GwitterModule.java
Created file gwitter/src/com/zam/gwitter/server/GreetingServiceImpl.java
Created file gwitter/src/com/zam/gwitter/shared/FieldVerifier.java
Created file gwitter/war/WEB-INF/web.xml
Created file gwitter/war/GwitterModule.css
Created file gwitter/war/GwitterModule.html
Created file gwitter/war/favicon.ico
Created file gwitter/.classpath
Created file gwitter/.project
Created file gwitter/GwitterModule.launch
Created file gwitter/README.txt
Created file gwitter/GwitterModuleTest-dev.launch
Created file gwitter/GwitterModuleTest-prod.launch
Created file gwitter/test/com/zam/gwitter/GwitterModuleJUnit.gwt.xml
Created file gwitter/test/com/zam/gwitter/client/GwitterModuleTest.java
Created file gwitter/build.xml
[ NOTE : GwitterModule*.launch are launch configurations for Eclipse depending on application modes.]
STEP 4 Run an app in dev mode
prayag@prayag:~/workspace_gwt$ cd gwitter/
prayag@prayag:~/workspace_gwt/gwitter$ ant devmode
Buildfile: /home/prayag/workspace_gwt/gwitter/build.xml
libs:
[mkdir] Created dir: /home/prayag/workspace_gwt/gwitter/war/WEB-INF/lib
[copy] Copying 1 file to /home/prayag/workspace_gwt/gwitter/war/WEB-INF/lib
[copy] Copying 1 file to /home/prayag/workspace_gwt/gwitter/war/WEB-INF/lib
javac:
[mkdir] Created dir: /home/prayag/workspace_gwt/gwitter/war/WEB-INF/classes
[javac] /home/prayag/workspace_gwt/gwitter/build.xml:29: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
[javac] Compiling 5 source files to /home/prayag/workspace_gwt/gwitter/war/WEB-INF/classes
[copy] Copying 1 file to /home/prayag/workspace_gwt/gwitter/war/WEB-INF/classes
devmode:
STEP 5
The above command starts GWT's development mode server, a local server used for development and debugging, as follows:
Launch the local server in a browser by either
1) clicking "Launch Default Browser" or
2) clicking "Copy to Clipboard" (to copy its URL), then pasting into Firefox, Internet Explorer, Chrome, or Safari.
Since this is the first time hitting the development mode server, it will prompt to install the Google Web Toolkit Developer Plugin.
The application will load in development mode, as follows:
References
Get Started with the GWT SDK, available at https://developers.google.com/web-toolkit/gettingstarted
Command-line Tools, available at https://developers.google.com/web-toolkit/doc/latest/RefCommandLineTools
No comments:
Post a Comment