Sometimes, when I start Eclipse (Java EE IDE for Web Developers, Indigo SR 1) on my MacOSX Lion, my GWT (2.4.0) project initially fails to compile<
Also an other soulutin is to move the GWT SDK to the top of the Library list(right after your project) on the Properties/Java Build Path/Order and Export page.
In my case the GWT_CONTAINER was added below the JRE_CONTAINER. Fixing this manually within my .classpath file solved the problem!
<classpathentry kind="con" path="com.google.gwt.eclipse.core.GWT_CONTAINER"/>
<classpathentry exported="true" kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
I encountered the same problems as described above. But none of the solutions worked.
What did work was moving the GWT SDK above the other GWT dependencies in the build path. See the following blog (written by my personal hero of the day): Grant Little's Blog
I tried the above, but had to do a bit more:
From above:
What I did extra:
And that did it for me. Moving it in the Build Path GUI did not seem to work for me!
So, the start of my .classpath ended up looking like this:
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="com.google.gwt.eclipse.core.GWT_CONTAINER"/>
etc...
I believe the problem was occurring because Eclipse had some stale settings about available/linked GWTs.
Therefore, building on the answer by Chris Cashwell, I recommend the following:
Project>Properties>Google>Web Toolkit>Configure SDKs, .EDIT: Sometimes, I still need to do a Project > Clean, but this is rare now.
You could use maven for compilation and setting up your workspace.
However I guess this would be overkill for you.
There is a Maven GWT Plugin.