How to install Eclipse java editor in Ubuntu 14.04 LTS manually after downloading Eclipse from the eclipse.org website. This is a guide for offline installation of Eclipse software.
Process 1)
1) Extract the eclipse-linux-gtk.tar.gz using a terminal window in Ubuntu.
$ tar -zxvf eclipse-linux-gtk.tar.gz
2) Using the root user you use the following command from a terminal window. Copy the extracted folder named eclipse to /opt directory. you can rename the folder from eclipse to any name you want.
$ sudo mv eclipse /opt
3) Create a desktop file using the following command:
$ gedit eclipse.desktop
4) Copy the following to the eclipse.desktop file. Then save the file.
[Desktop Entry]
Name=Eclipse
Type=Application
Exec=env UBUNTU_MENUPROXY=0 eclipse44
Terminal=false
Icon=eclipse
Comment=Integrated Development Environment
NoDisplay=false
Categories=Development;IDE;
Name[en]=Eclipse Luna Java SE
5) Then execute the following command to automatically install it in the unity, from the terminal window.
$ sudo desktop-file-install eclipse.desktop
6) Create a symlink in /usr/local/bin using the following command run from a terminal
$ sudo ln -s /opt/eclipse/eclipse /usr/local/bin/eclipse44
7) To display eclipse icon in dash board, run the following command
$ sudo cp /opt/eclipse/icon.xpm /usr/share/pixmaps/eclipse.xpm
Process (2)
1) download the tar.gz file from eclipse.org. Extract it by executing a command line
tar -xzf eclipse-linux-gtk.tar.gz
Or
By using the Archive Manager. Double click on the eclipse-linux-gtk.tar.gz file , which is a basically archive file. It will show up a Eclipse folder , just drag it in the desktop or anywhere you like.
2) then move the extracted “eclipse” folder to /opt/ folder
mv eclipse /opt/
sudo chown -R root:root /opt/eclipse
sudo chmod -R +r /opt/eclipse
3) Create an eclipse executable in your user path, a batch file & provide the batch file permission using the chmod command. touch is a command to create the file.
sudo touch /usr/bin/eclipse
sudo chmod 755 /usr/bin/eclipse
Create a file named “eclipse” in “/usr/bin/” folder with your editor like vi or edit –
Copy the follwong 3 lines into the batch file and save it.
#!/bin/sh
export ECLIPSE_HOME=”/opt/eclipse”
$ECLIPSE_HOME/eclipse $*
4) Create a Gnome menu item. First Create a file named eclipse.desktop in /usr/share/applications/ folder then inside the file eclipse.desktop type the following lines with your preferred editor (gedit) & save it.
[Desktop Entry]
Encoding=UTF-8
Name=Eclipse
Comment=Eclipse IDE
Exec=eclipse
Icon=/opt/eclipse/icon.xpm
Terminal=false
Type=Application
Categories=GNOME;Application;Development;
StartupNotify=true
5) Then Launch Eclipse from command line like the following.
/opt/eclipse/eclipse -clean &
You can Lock Eclipse to the launcher bar by clicking right button on Lock to Launcher.
Reference : http://askubuntu.com/questions/26632/how-to-install-eclipse
Related article :
- install Netbeans in ubuntu 14.04 LTS offline and manually
- Install Java in Ubuntu : Click here or visit this link in askubuntu
- If you want to learn Java from a tutor click here
- Learn About Environment Variables in Ubuntu required for Java. also you shall get some good suggestion here on JRE or JDK related problems to run Eclipse by clicking the icon in ubuntu dashboard.. if you get this error shown below-
A Java Runtime Environment (JRE) or Java Development Kit (JDK) must be available in order to run Eclipse. No Java virtual machine was found after searching the following locations: /home/.../eclipse/jre/bin/java java in your current PATH