How do I upgrade to GWT 1.4?

Upgrading to 1.4 is easy! Just follow the steps below and you'll be up and running with GWT 1.4.

NOTE: Before upgrading, please see the release notes for details on anything that has changed from 1.3 that may require you to update your client code to work with GWT 1.4.
  1. Update your GWT library JARs

    After downloading and extracting the GWT 1.4 package, update your GWT project classpath by removing the old gwt-user.jar and gwt-dev-<platform>.jar files and adding entries to the new 1.4 versions. If your project uses GWT-RPC, be sure to also update the classpath entry for gwt-servlet.jar to the 1.4 version.

    The steps below describe how to update your GWT library JARs using Eclipse, but you could easily adapt these steps to your favorite IDE without much trouble.

    1. Right-click on your GWT project and select Properties
    2. From the Properties menu, click on Java Build Path
    3. In the Java Build Path window, click on the Libraries tab
    4. From the list of JARs on the project classpath, select each GWT JAR described above and click Remove (alternatively, you can click Edit instead and point each JAR entry to the new GWT JARs in the extracted GWT 1.4 package)
    5. After removing the old entries, click on Add External JARs
    6. Browse to the directory where you extracted the GWT 1.4 package
    7. Select gwt-user.jar and click on OK
    8. Repeat steps 5 through 7 for gwt-dev-<platform>.jar, as well as gwt-servlet.jar if your project uses GWT-RPC
    9. Click on OK to accept changes and exit the Properties menu
    10. Re-build your project with the new JARs (while making sure your project is selected in the Navigator/Package Explorer view, click on Project > Build. In case Eclipse is holding onto cached class files, you may also want to run a clean build by clicking on Project > Clean... > selecting your project and clicking OK)
    11. (Optional) If you're using shell or compile scripts generated by GWT's applicationCreator, or if you have some Run Configurations defined in your Eclipse project, be sure to update their classpaths to use the new GWT 1.4 JARs as well. This can be done by simply editing the scripts to point the -classpath java argument to the new JARs or by updating the classpath in the Classpath tab of the Eclipse Run Configuration menu in a similar fashion as described in the steps above.

  2. Update to the new 1.4 bootstrap process

    By making fewer HTTP requests at startup, the GWT bootstrap process has changed to speed up application loading time. The old GWT 1.3 bootstrap process still works in 1.4, but the new process is way more efficient, so it's worth making the update. Check out the details below that describe how the bootstrap process has changed and what you need to do to update to the 1.4 style.

    In GWT 1.3, your application host page needed to include:

    • a <meta> tag describing your module name in the head of your host page
        <meta name="gwt:module" content="" />
    • and the gwt.js <script> tag in the body of your host page
        <script src="gwt.js" type="text/javascript"></script>

    In GWT 1.4, all you need to include is the <script> tag in the body of your host page:
      <script language="javascript" src=""></script>

  3. Done!
    Your GWT project should now be updated to GWT 1.4! As a final step, however, you may want to clear your .gwt-cache folder to make sure hosted mode doesn't use any stale 1.3 cached bytecode files. Also, if you're using GWT-RPC, be sure to run a javac compile (or have your IDE run a re-compile) over your service classes and point your project and deployed application to the new binaries.

    To get your new GWT 1.4 application up and running on your web server, just recompile your client code and copy the compiled JavaScript and supporting files (in particular, note that you need to include ".gwt.rpc" files when you deploy) to your web server along with all your other application resources.
Google apps
Main menu
Search Help Center