Eclipse: source attachment does not contain source - SmackConfiguration

I’m building a server app to talk to Google Cloud Messaging.

At this line: config = new ConnectionConfiguration(GCM_SERVER, GCM_PORT);

I get the Class File Editor error:

"Source not found

The source attachment does not contain the source for the file SmackConfiguration.class

You can change the source attachment by clicking Change Attached Source below:"

There is a button called “Change Attached Source…”. Clicking on it takes me to the window which allows me to specify where the source for smack-core-4.0.5.jar.

I have it pointing to the src folder within my project something like “MyApp/src/com/domain/gcm/ccs/server”

This folder contains smack-core-4.0.5-sources and smack-core-4.0.5-javadoc.

I got the Smack 4.0.5 API here

Ignite Realtime: Downloads

And I was following the advice from this StackOverflow thread to “please use current stable version of smack-4.0.4;Are you trying to run this code in pure java application??if is it so download latest smack library from this link igniterealtime.org/downloads/index.jsp and add smack-core-4.0.4.jar,smack-extension-4.0.4.jar(replacement of smackx.jar),smack-tcp-4.0.4.jar,and json-simple-1.1.1.jar.”

android - GCM XMPP server Implementation(in java) using Smack library fails with error SASL authentication PLAIN failed …

However I did not include smack-extension-4.0.5.jar because there was no compiler errors when including just smack-core and smack-tcp.

Here is my project’s Java Build Path: Libraries

If you point eclipse to a directory as source attachment, it expects the source as plain source files within that directory. You have to point to the source jars.