Installing JDK 8 for MAC
If you have JDK 9 installed, you will need to also install JDK 8 which can be found here. After you install it, start eclipse and right click on your project and choose Properties.
Then select Java Build Path on the left and the Libraries tab on the right.
The JRE System Library entry will probably be set to version 1.9. Select that entry and click the Edit button to the right:
Select the Alternate JRE entry and click the Installed JREs button on the right:
If the Java SE 8 appears in the list, select it. Otherwise, click the Add button on the right:
For the JRE home field, navigate to the shown path. For the JRE name give it something descriptive like JDK 8. Then click Finish.
Then back on the Installed JREs page, select the newly installed JDK 8 and click Apply and Close:
Then back on the Edit Library page, make sure that the JDK 8 is selected and click Finish.