Install the version to match your operating system. Do this first, before installing Eclipse.
Click http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html link to open resource.