Problem:Syntax error, annotations are only available if source level is 1.5

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?

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章