I was stuck with the same error a few days ago. In my case, it was the incompatibility of my JDK and the selected target JVM for my Scala project.
To check the current version of Java, run java -versionat a command prompt. To check the goal of the JVM project in Eclipse, go to "Project> Properties> Scala Compiler" and check the target JVM (select the same version as your current Java).
Hope this helps.
source
share