The following commands are easy and perfect to install Eclipse on Ubuntu 14 and above. This tutorial was tested using
  1. Ubuntu 16.04
  2. Eclipse Oxygen
You can install any Eclipse flavor  using following commands

Steps to install Eclipse:
  1. Download the Eclipse tar.gz file using url - https://www.eclipse.org/downloads/
  2. Right click on Eclipse tar.gz file and Extract it.
  3. After extracting Eclipse it will have the folder name eclipse-installer
  4. In Eclipse-installer folder Right-Click on eclipse-inst.exe file and click run
  5. Some time it requires JRE/JDK 8 or higher version so to install JRE/JDK 8 use following command sudo apt-get install openjdk-8-jre-headless
  6. Select the type of version you want to install (in my case i am installing JAVA IDE for Java Developers)
  7. Select the folder (optional) where you want to install eclipse and hit Install.
  8. Within the installation process it will ask for certificate trust, Select certificates and click Accept Selected.
  9. Done you have successfully installed Eclipse, Click on Launch for working with eclipse.