To find out which Java Eclipse is using, go to Help > About Eclipse click Installation Details and go to the Configuration tab.
When you run Java programs from Eclipse, you can choose which Java to use. Preferences > Installed JREs lists the Preferences > Installed JREs (and JDKs) that Eclipse knows about. Run Configuration for a program shows which Java is used to run the program.
source share