Go to Window | Preferences
. Then under Java | Installed JREs
, click "Add"
, click "Standard VM"
, then "Next"
, then "Directory"
, and find the location where you installed JDK 1.8
.
Lastly, make sure the checkbox next to it, on the list of installed JREs, is switched on.