Syntax error, annotations are only available if source level is 5.0

原文:http://heisetoufa.iteye.com/blog/621396

 

 

Syntax error,annotations are only available if source level is 5.0 
解决办法:Project->Properties->Java Compiler->Compiler Compliance Level选择5.0或者以上的jdk版本 
Project->Java Build Path->Libraries->Add Library...->JUnit->Select "JUnit 4.0"->Finish 经过以上设置后可顺利解决问题。 

你可能感兴趣的:(jdk,JUnit,Build,Annotations)