At first ,we have to download latest eclipse from Eclipse Downloads by choose the right version based on the OS type 32-bit or 64-bit.
Once the file has already been download, we will extract this file by using the sudo tar -zxvf
For creating an Eclipse launcher shortcut, we will create a new file eclipse.desktop in /usr/share/applications (# 2) and add the following content
[Desktop Entry]
Name=Eclipse Luna SR2 (4.4.2)
Type=Application
Exec=/opt/eclipse/eclipse
Terminal=false
Icon=/opt/eclipse/icon.xpm
Comment=Integrated Development Environment
NoDisplay=false
Categories=Development;IDE;
Name[en]=Eclipse
So do that the entity menu will be added now.
If we want to open eclipse in command mode, we can create a link file using the sudo ln -s /opt/eclipse/eclipse /usr/local/bin/ command to finish it.
Reference :
(# 1) How to know the OS type installed? we can execute the uname -a | awk '{print $12}'
command and it will tell us which version depend on the output is
x86_64
(64-bit) or i386
(32 bit)(# 2) We can create/manage the launchers (*.desktop files) in one of the following directories:
/usr/share/applications
/usr/local/share/applications
~/.local/share/applications