• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Piet Souris
  • salvin francis
  • Stephan van Hulst
  • Frits Walraven
  • Carey Brown
  • Jj Roberts

GWT 2.3 in Eclipse Indigo - can't even do the demo program/tutorial?

Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, so it seems I'm barraging the board with Eclipse questions.

I have Eclipse Indigo, and I installed the GWT plugin for Eclipse as per the instructions linked from the Getting Started page.

I selected all three components:
- Google Plugin for Eclipse
- GWT Designer for GPE
- SDKs

Oddly, the Detailed Instructions page only shows "Plugins" and "SDK" - but I didn't think much of it at the time.

No problem, install plugins, restart Eclipse.

Then I went along to the sample web app described here, and followed the instructions.

Again, some inconsistencies. Specifically, no image or mention of the checkbox option "Generate GWT project sample code"

If I leave that box checked, and click Finish, I get an error dialog stating:
Java Virtual Machine Launcher
Could not find the main class:
com.google.gwt.user.tools.WebAppCreator. Program will exit.

Clicking OK on this then pops up an error dialog stating:
Creation of element failed.

Invocation of com.google.gwt.user.tools.WebAppCreator failed.
See the error log for more details.

Uh, where is the error log?

Anyway, if I UNCHECK the option "Generate GWT project sample code", then I can create the project, sort of. But I run into trouble immediately afterward. The next step is Run Locally in Development Mode, so I follow that instruction and do exactly what it says: Right click on the project and select Debug As -> Web Application

When I do that, the console gives me the following:
Missing required argument 'module[s]'
Google Web Toolkit 2.3.0
DevMode [-noserver] [-port port-number | "auto"] [-whitelist whitelist-string] [-blacklist blacklist-string] [-logdir directory] [-logLevel level] [-gen dir] [-bindAddress host-name-or-address] [-codeServerPort port-number | "auto"] [-server servletContainerLauncher[:args]] [-startupUrl url] [-war dir] [-deploy dir] [-extra dir] [-workDir dir] module[s]

-noserver Prevents the embedded web server from running
-port Specifies the TCP port for the embedded web server (defaults to 8888)
-whitelist Allows the user to browse URLs that match the specified regexes (comma or space separated)
-blacklist Prevents the user browsing URLs that match the specified regexes (comma or space separated)
-logdir Logs to a file in the given directory, as well as graphically
-logLevel The level of logging detail: ERROR, WARN, INFO, TRACE, DEBUG, SPAM, or ALL
-gen Debugging: causes normally-transient generated types to be saved in the specified directory
-bindAddress Specifies the bind address for the code server and web server (defaults to
-codeServerPort Specifies the TCP port for the code server (defaults to 9997)
-server Specify a different embedded web server to run (must implement ServletContainerLauncher)
-startupUrl Automatically launches the specified URL
-war The directory into which deployable output files will be written (defaults to 'war')
-deploy The directory into which deployable but not servable output files will be written (defaults to 'WEB-INF/deploy' under the -war directory/jar, and may be the same as the -extra directory/jar)
-extra The directory into which extra files, not intended for deployment, will be written
-workDir The compiler's working directory for internal use (must be writeable; defaults to a system temp dir)
module[s] Specifies the name(s) of the module(s) to host

I've tried searching for this on the web, to no avail.

I am completely new to GWT, and am a bit baffled - I'm sure people must've tried this before with no issues.

Any thoughts? Suggestions? Anyone run into this before? Right now I'm dead in the water with this.

Thanks in advance...
Joe Vahabzadeh
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Solution found . . er, sort of.

Apparently, the GWT plugin doesn't account for the possibility of the CLASSPATH environment variable being set.

So, on a Windows machine, at least (not sure about other OSes), if you have a CLASSPATH environment variable, you have to get rid of it, then quit and relaunch Eclipse, and the problem goes away.

See Issue 5586 for the Google Web Toolkit.

The command-line version of the GWT SDK doesn't have this problem, as it runs Java with the -cp option and sets its own classpath as needed.

Hope this helps anyone else who runs into this issue as a GWT newbie.

Now if only they'd fix that in the plugin......
Posts: 5856
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Setting the CLASSPATH env var globally is the best way I know of to get into all kinds of trouble and cause countless problems! I never set it on any of my systems.
Joe Vahabzadeh
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Apparently so!

Now if I can convince others here that perhaps we don't need to set it globally on our Windows machines....
snakes are really good at eating slugs. And you wouldn't think it, but so are tiny ads:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic