Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The project XXX does not have any GWT SDKs on its build path

Tags:

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.

Eclipse displays the following message in the "Problems" section:

The project XXX does not have any GWT SDKs on its build path 

Here is a list of semi-solutions that sometimes work (I normally try them in this order):

  1. Project > Clean.
  2. Remove and re-add GWT SDK to the build path.
  3. Restart the machine.

Any help with preventing the problem from re-occurring would be most welcome.

like image 284
Rok Strniša Avatar asked Dec 16 '11 21:12

Rok Strniša


People also ask

Why there is no build path in Eclipse?

It looks like you did not add Eclipse project metadata files to your source control system, so Eclipse doesn't know what your build path is or whether it is even a java project.

Where is build path in Eclipse?

Procedure. In Eclipse select the web project and right-click Build Path > Configure Build Path. This will display the Java Build Path window.

What is the Java build path?

Build path is used by the compiler to resolve dependencies and build a project. Classpath is used during runtime when running a project in order to find necessary dependencies. Build path is configured on the Java Build Path property page of a project.


2 Answers

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

like image 64
Hugo Avatar answered Oct 02 '22 18:10

Hugo


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:

  1. Remove all GWTs from your build path. (You might have more than one GWT on your build path.)
  2. Remove all GWTs linked in Eclipse in Project>Properties>Google>Web Toolkit>Configure SDKs, .
  3. Add only the latest GWT, and make it default.

EDIT: Sometimes, I still need to do a Project > Clean, but this is rare now.

like image 20
Rok Strniša Avatar answered Oct 02 '22 16:10

Rok Strniša