When using JDK 8 and an IDE (or any other code processing tool / framework) with its own compiler, such as Eclipse, you need to upgrade the tool to a version with Java 8 support, even if you are not using the new features of Java 8.
The reason is that the compiler must be able to load the latest JRE class files to compile the software that references those classes.
Sometimes you can get away with an older compiler when it ignores the newer version number of the class files. But some types will confuse old-class file parsers as they use new features, in particular
AnnotatedElement which now has methods
interface which now has methods
Eclipse appears to make no difference between references for which no class file was found and class files which it failed to read when it says ““classname”cannot be solved. “
The same is true for all tools and frameworks that use ECJ as a built-in compiler.