It happens when you compile your projects on higher version
of java(say jdk 1.8) and then run it on a lower version
(say jdk 1.7).
If you have JRE-1.7 library in your project path then ,
1.Right click on project
2.Go to Properties
3.Select Project Facets
4.Find Java in rows and then choose version (say 1.7) if using JRE-1.7
5.Click Apply and run your project.