ERROR - Java 8 - Duplicate annotation @


Duplicate annotation @ while working on Java 8 Code

Error Type

Compile Time

Possible Cause

Repeating or Duplicate Annotations have been introduced and legitimate with Java 8. The code might have been built with version 7 or earlier.


Make sure that you are building the code using JDK 8 or Java 8

If you are using Eclipse 

Go to Windows -> Preferences -> Java - > Compiler and make sure that the JDK and compliance level is 1.8

If you don't intend to build the code with JDK 8, Remove one repeating annotation.