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
Go to windows -> Preferences -> Java -> Installed JREs
may be jre is already added
click on Add -> Standard VM -> Next -> Directory
and browse for the JDK
in my case path was C:\Program Files\Java\jdk1.8.0_111
then Click on finish.
you will see window like this
select JDK -> Apply -> Ok
And You are done.