In Eclipse Juno, I installed the latest m2e plugin (1.2.20120903-1050). In preferences, I have added jdk1.7.0_11 in Java -> Installed JREs -> Add, and then specified the lo
If you are getting following type of error
Then do the following steps-->>
(I have Java 8 installed) Check the check box if it is not checked. Click apply and close.
Now Press Alt+Enter to go into project properties,or go via right clicking on project and select Properties.
In Properties select Java Build Path on left corner
Select Libraries
And click edit(after selecting The JRE System Library...) In edit Click and select Workspace default JRE. Then click Finish
In Order and Export Check the JRE System Library.
Then Finally Apply and close Clean the project and then build it.
Problem Solved..Cheers!!