Lets try to understand the Error:

As the error show the code is built for Java 7. If you try to build in less the Java 7 version. This error will be shown.

So you need to compile your project under < Java 7 version.

if you are using Maven just use Maven version 3.0.5, since Maven

How to Identify the code is built for which Java version ?

Just refer major.minor.version code listed below:

J2SE 8   - 52
J2SE 7   - 51
J2SE 6.0 - 50
J2SE 5.0 - 49
JDK 1.4  - 48
JDK 1.3  - 47
JDK 1.2  - 46
JDK 1.1  - 45

Solution is Either upgrade your Java version to 7 Or change your development JDK configurations to 1.6.

Advertisements