First of all you have to know some stuffs about JAVA. Java uses a JVM (Java virtual machine) wich is the JDK and need to be installed on your computer.
The JDK makes the JVM run and the JRE allow you to compile etc java class. (No need for both, just install the JRE)
see this page.
Then you'll have to configure a window GLOBAL VARIABLE. The JAVA_HOME var.
"1-Right click My Computer and select Properties.
2-On the Advanced tab, select Environment Variables, and then edit JAVA_HOME to point to where the JDK software is located".
This way Eclipse will be able to find the installed JRE.
Finally, in eclipse, check that it know the JRE.
And that's it. There is a lot of info over the web about this for more details.