First check if Eclipse has set up Project auto-compile: eclipse-"project-" buildautomatically, this option must tick, if not tick the line after the tick.
Secondly, the project of the Classpath have not quoted the wrong library, generally in the corresponding library have red fork, if the problem arises, then the corresponding library modified correctly.
Of course, if the error library is not referenced in this file, we can also compile by ignoring the existence of these errors by other settings compilation.
Note that there are projects there are also global, must be two are set to be able to compile.
Specific project settings, right-click Project-"properties-" Java compiler-"Building
Global settings: eclipse-"preferences-" Java compiler-"Building
After the above operation, if not yet, can be cleaned, let Eclipse recompile: eclipse-"project-" clean.
A workaround for Eclipse partial files not compiling