Problem :
Error Message : Syntax error, annotations are only available if source level is 1.5
Solution :
You can do that at Window > Preferences > Java > Compiler for the entire workspace or on a project by project bases by right clicking in the Package Explorer view and selecting Properties > Java Compiler .
備註 :如果現在Eclipse中設置的JRE是1.6,出現瞭如上的錯誤。先從preferences裏把JRE改成1.5,rebuild, 然後再改回1.6就沒有錯誤了。why?