Syntax error, annotations are only available if source level is 1.5 or greater Right click your project, select properties, and then modify and save as shown in the figure