This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes IDEs, Version Control and other tools and the fly likes GWT 2.3 in Eclipse Indigo - can't even do the demo program/tutorial? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "GWT 2.3 in Eclipse Indigo - can Watch "GWT 2.3 in Eclipse Indigo - can New topic
Author

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

Joe Vahabzadeh
Ranch Hand

Joined: Jan 05, 2005
Posts: 140
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:
New
Creation of element failed.

Reason:
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]

where
-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 127.0.0.1)
-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)
and
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

Joined: Jan 05, 2005
Posts: 140
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......
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5779
    
    7

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.


JBoss In Action
Joe Vahabzadeh
Ranch Hand

Joined: Jan 05, 2005
Posts: 140
Apparently so!

Now if I can convince others here that perhaps we don't need to set it globally on our Windows machines....
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: GWT 2.3 in Eclipse Indigo - can't even do the demo program/tutorial?
 
Similar Threads
Using Eclipse for Web App
cannot sete debug mode in client side code
Some Deployment Error. JBoss(4.2). Error code 404 displayed while running Project.
apache (tomcat) not parsing XML file?
GWT, Maven 2, Eclipse, Spring, Hibernate advice