I can\'t get autocompletion to work on Eclipse.
I\'m working on the project on svn. I set up project in Eclipse by going into
File -> Import -> Checkout As
I found that I was getting this error due to having my files, including my main class, outside of the .src folder.
Run "mvn eclipse:eclipse" from terminal.
I did copy the .classpath and .project from another project and adjusted the values properly.
Close the project before editing those files, when you are sure they reflect the reality (your reality anyway), re-open the project in Eclipse.
The workspace is rebuilt and all should work from then on.
I also had this problem after converting my java project into a maven project. I solved it as follows:
Right click on your project ->Project Facets -> click on Java, then Apply.
I might be picking up the wrong things from so many comments, but if you are using Maven, then are you doing the usual command prompt build and clean?
Go to cmd, navigate to your workspace (usually c:/workspace). Then run "mvn clean install -DskipTests"
After that run "mvn eclipse:eclipse eclipse:clean" (don't need to worry about piping).
Also, do you have any module dependencies in your projects?
If so, try removing the dependencies clicking apply, then readding the dependencies. As this can set eclipse right when it get's confused with buildpath sometimes.
Hope this helps!
What i did is after importing the project from svn , deleted the project from workspace and imported it as a maven project from local . Then in preferences->maven->usersettings->in usersettings box gave path of settings.xml which will be in apache maven folder-> conf->settings.xml
and it solved the issue for me.