I have been trying to use the Hosted Mode with Eclipse to develop my application, but I’m stucked in a ClassCastException when I try to run the Debug from Eclipse.
I followed all the steps in the tutorial to build and test a GWT Widget, but I won’t build a widget so I jumped the steps that talk about the widget. I have made these steps:
Create the project
Import the GWT directory installation with the FILE > IMPORT
Put the GWT dir in the build path with the PROJECT > PROPERTIES > JAVA BUILD PATH > LIBRARIES > ADD CLASS FOLDER
Put the ItMill jar in the build path.
Created the Debug as specified in the Tutorial, verifying that all the buildpath is in the classpath.
Neither the Debug and nor any java file (Ctrl+Space) from Eclipse can’t find/import the “com.google.gwt.dev.GWTShell” class. So what can be wrong?!?!?
The GWTShell is in gwt/gwt-dev-.jar. The classpath of the launch configuration should include the project classpath by default, so if you have the jar in the project classpath, you should not have a problem. If the library is missing from the classpath, I get NoClassDefFoundError exception, which is different from your error, so I’m not sure if it is the problem.
In step 3, you might want to just add the jars to the project classpath, with “Add JARs…” button.