There are various options are available to test which java version is using your eclipse. The best way is to find first java installed in your machine.
run java -version command on terminal
then to check whether your eclipse pointing to the right version or not.
For that go to
Eclipse >> Preferences >>Java >>Installed JREs