This guide will show you how to install Eclipse IDE in Ubuntu environment. It’s written specifically for Java edition of eclipse, but this can be used with any other distribution of Eclipse as well.
Step-1: Check Java Installation
First of all, check whether java is installed on your system. You can check this by using below command on ubuntu shell
java -version
If java is not installed, then you can install it by using below command.
sudo apt-get install default-jre
Step-2: Download Eclipse IDE
After installing java, download Eclipse binary from the download section of the official website. See link below.
http://www.eclipse.org/downloads/eclipse-packages/
For ubuntu, make sure to download Linux version. Choose “Eclipse IDE for Java Developers” package. Package may have name in below format.
eclipse-java-neon-R-linux-gtk-x86_64.tar.gz
After you downloading correct package, extract it using below command. Change file name as needed.
tar -zxvf eclipse.XX.YY.tar.gz
Copy extracted folder to /opt directory.
sudo cp -r eclipse.XX.YY /opt
Create a desktop file in the location /usr/share/applications and install it:
sudo nano /usr/share/applications/eclipse.desktop
Copy following to the eclipse.desktop file.
[Desktop Entry]
Name=Eclipse
Type=Application
Exec=eclipse
Terminal=false
Icon=eclipse
Comment=Integrated Development Environment
NoDisplay=false
Categories=Development;IDE;
Name[en]=Eclipse
Give desktop file permission to be executed, run:
sudo chmod +x leafpad /usr/share/applications/eclipse.desktop
Run following command to automatically install it in the unity:
sudo desktop-file-install leafpad /usr/share/applications/eclipse.desktop
Create a symlink in /usr/local/bin using
cd /usr/local/bin
ln -s /opt/eclipse/eclipse
For an eclipse icon to be displayed in dash, eclipse icon can be added as
cp /opt/eclipse/icon.xpm /usr/share/pixmaps/eclipse.xpm
After this you should see Eclipse in Menu.

On clicking this icon you should be able to open Eclipse IDE