i think u must right click on your project --> properties --> in sources change source/binary format to jdk 1.7 --> in libaries java platform to 1.7