简体   繁体   中英

Cannot use GWT in Development Mode

I am attempting to create a client application using the Google Web Toolkit. I have downloaded the latest tools and am trying to use Eclipse as my development environment.

I am following the tutorials on the GWT web site. It looks like they are mostly out- of- date and incomplete.

Case in point: I am supposed to be able to run Eclipse in development mode, and the instructions say that to do that you click on Run As "Web Application". There is no such command available in the latest GWT SDK for Eclipse!

The commands available when you pick "Run As" (right clicking the project) include "GWT Compiler" and "GWT Development Mode" as well as some other Jetty- related modes. I select "GWT Development Mode" and get a page with the following text:

GWT Code Server
Drag these two bookmarklets to your browser's bookmark bar:
Dev Mode On Dev Mode Off
Visit a web page that uses one of these modules:
testclient
Click "Dev Mode On" to start development mode.

I put the bookmarklets into the bookmark bar and click on my link to testclient. I get a page with the following:

testclient (GWT Code Server)

This module hasn't been compiled yet.

Output Files

(From the last successful compile.)

testclient.nocache.js
testclient.recompile.nocache.js
clear.cache.gif

Note the line that says the module hasn't been compiled. When I click on the Dev On bookmark, I get an alert with the following message:

Can't find any GWT Modules on this page.

There is nothing in the tutorial about compiling modules. In fact, the tutorial information seems based on using an old dev plugin that doesn't even work in the latest browsers (including Chrome!). Worse, because the tutorial doesn't describe what I am seeing in dev mode, there is no instruction on how to create the "modules" that the system is looking for.

I have tried just using the GWT compiler, and I have tried recreating the project and restarting GWT Development Mode. I am seeing everything being compiled. There is nothing anywhere describing whether or not a module is being created, and no instruction on how to make one.

This system is looking to be unusable (unfortunate because a few years ago I was able to use GWT to create a single- page application). I am hoping someone here knows how to get the dev mode working properly before I abandon GWT completely.

Has anyone created some more complete and up- to- date documentation on how to use GWT??? Can anyone tell me how to create a module and get the dev mode working properly???

Someone please advise.

Dev Mode was deprecated in favor of Super Dev Mode years ago. Super Dev Mode works with all modern browsers, is closer (if not similar) to production mode and doesn't need any plugins.

However, since classic Dev Mode is the only way to use the IDE to debug client-side Java classes, we still use Firefox v26 with the GWT Developer Plugin for our day-to-day developing and testing. There's not really much of a difference between that and modern browsers.
Once the bulk development is done and when you want to test in Chrome / Edge / IE / Safari / mobile / etc. (mostly to refine CSS / UI), you just switch to Super Dev Mode.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM