Refer :http://www.cnblogs.com/mengfanrong/p/3745475.html
Righ click on your project > properties > Java compiler > enable "project specific settings" Set Compiler compliance level to 1.6 re Build your project