How can Eclipse find JDK in Linux?
If Eclipse isn't finding your JRE/JDK or finding the wrong version, add the following two lines to the begining of your eclipse.ini file:
-vm
[your-path-to-java-executable]
Another possible solution is to add your java bin path to your environment variable PATH in /etc/profile file. Something like this
sudo gedit /etc/profile
Go to the end of the file and add this line:
export PATH=$PATH:/path/to/your/jdk/bin/