If you've downloaded Eclipse from their official website, follow these steps for the installation. (Ubuntu 12.04 LTS)
-
Extract the eclipse.XX.YY.tar.gz using
tar -zxvf eclipse.XX.YY.tar.gz -
Copy the extracted folder to
/optsudo cp -r eclipse.XX.YY /opt -
Create a desktop file and install it:
gedit eclipse.desktopand copy the following to the
eclipse.desktopfile.[Desktop Entry] Name=Eclipse Type=Application Exec=eclipse Terminal=false Icon=eclipse Comment=Integrated Development Environment NoDisplay=false Categories=Development;IDE; Name[en]=Eclipsethen execute the following command to automatically install it in the unity:
sudo desktop-file-install eclipse.desktop -
Create a symlink in
/usr/local/binusingcd /usr/local/bin sudo ln -s /opt/eclipse/eclipse -
For eclipse icon to be displayed in dash, eclipse icon can be added as
sudo cp /opt/eclipse/icon.xpm /usr/share/pixmaps/eclipse.xpm
That's it.