Your problem, based on Unsupported major.minor version 51.0
is wrong Java version. The library you are using is compiled in one version, and you are using a different one (most probably, or definitely) you are using a lower version.
Version 51.0 refers to Java 7. I'd say the library you are using is Java 7 and yours is lower... To change this, go to:
Window -> Preferences -> Java -> Compiler
And set the Compiler compliance level
higher, at least 1.7
(i.e. Java 7). If that's not an option, install a newer Java JDK (pref 1.8, that can, if you wish, also compile to Java 7).
Unsupported major.minor version 5{1,2,..}.0
(copied from https://stackoverflow.com/a/11432195/928952)
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
A more elaborative explanation of updating the JDK Eclipse is using:
project -> properties -> java build path-> Add Library -> JRE System
Library-> Installed JREs -> Add(unless jdk* is already in the list,
then select that and go to next post -> standard VM -> Directory
button -> browse to the location where you installed the JDK. Inside
that directory you see a couple of folders, including bin and lib.
Make sure you select the parent
directory of them. Click OK. You'll then see a list of .jars under JRE
system libraries (must!) -> hit finish. Select the checkbox next to
jdk1.8*. Press OK then finish.
Now you've got the right Java version
in the Build Path... Now we have to make sure that becomes the
compiler Now we're back at the properties, Go to Java Compiler, make
sure enable project specific settings is turned off. Click Configure
Workspace Settings.... set the Compliance level: 1.8 -> apply (you get
a message on compiler settings changed rebuild blablabla hit yes) then
ok, then ok again...
Eclipse is given strange error on not finding libs
You can try deleting the .project and .classpath files in the root of
your project. Delete the project from workspace (don't delete your
source, backup first)... then reimport the project... might be that
eclipse has configured something that doesn't exist anymore... helps
me fix some dubious errors...