build.xml
How do I embed the entire GWT framework into my application?
- Add libraries and other dependencies to your project that will be required to build your GWT project.
- gwt-user.jar - core gwt library
- Add platform specific libraries to a separate folder that will be used to compile the java source to javascript; I create a separate folder for each platform
- gwt-dev-windows.jar - windows specific library
- gwt-II.dll - windows library
- swt-win32-3235.dll - windows library

- Setup your source using the recomended project structure as described here: GWT Project Structure
- Create ant build file that can be used to compile your java source code into js using the GWT libraries:
Sample GWT Compile Build Script
- A similar target can be used to run your application in hosted mode as the prior example.
Why do I continue to get an error that my class cannot be resolved when it is in the same source folder as my other GWT code?
Most likely you are trying to import a class that is not inside your client package which is required for all code that will be compiled by GWT.
How can I have DTO objects that are used by both my client-side and server-side code?
Prior to version 1.4 of GWT, the main problem with sharing DTO objects between the client-side and server-side code was that GWT required any classes that were transfered by RPC to implement a special class IsSerializable. This may not have been desirable for classes that were really independent of the front-end. In version 1.4 of GWT, you can now transfer objects that implement Serializable across RPC. To use these objects in your GWT client-side code however, you will need to create a module that contains the dto classes and inherit that module in your client GWT code.
Comments (0)
You don't have permission to comment on this page.