For Ubuntu 11.10, 12.04, 12.10
If the applications
folder does not exist inside ~/.local/share/
create it
mkdir ~/.local/share/applications
Check if your installation left you with a workable .desktop file for Eclipse and copy it if exists
cp /usr/share/applications/eclipse.desktop ~/.local/share/applications/
If the file does not exist create a .desktop file for Eclipse in your ~/.local/share/applications/
folder using gnome-desktop-item-edit
, ie:
gnome-desktop-item-edit --create-new ~/.local/share/applications/
On the name set it to Eclipse, on the command enter the path to the binary file of Eclipse, insert a comment if you want and click the icon to select the icon that you desire for Eclipse.
Press ok when you are finished.
After copying the file or creating your own open that folder location
nautilus ~/.local/share/applications/
Locate the file you just created and drag it to the launcher
/bin/sh
part in the Exec section. Remove it and it should work. By the way, what is your username?