I\'m compiling a project in Eclipse using m2eclipse. I set the JDK path in Eclipse like this:
Windows-->preferences-->installed jres--> jdk1.7.xx p
An alternative if jaipster's answer does not work is to go to: Window > Preferences > Java > Installed JREs
Then to edit the jre so that it points to the jdk and not the jre (the jre home filed in the jre package editor)
That worked for me.