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
In my case it was solved by doing this:
Go to your 'Runtime Configuration' and configure your JRE to an JDK.
I copied answer just in case it is deleted for some reason, but the source is here