How to install Eclipse for Java in Lubuntu (or Ubuntu)

How to install Eclipse for Java in Lubuntu (or Ubuntu)

This guide will walk you through how to install Eclipse in Lubuntu (LXDE) or Ubuntu environment. It’s written specifically for Java edition of eclipse, but this can be used with any other distribution of Eclipse as well.


First of all, you need to check whether you have java installed on your system. You can check by using the command:

java -version

If java is not installed, then you should install it by doing

sudo apt-get install default-jre


Afterwards, download Eclipse from the download section of the official website (

Make sure you download Linux version. Remember to choose Eclipse IDE for Java Developers package for your architecture (32bit or 64 bit). The package may have name in below format.



After you have downloaded the correct package, extract the eclipse.XX.YY.tar.gz using

tar -zxvf eclipse.XX.YY.tar.gz


Copy the extracted folder to /opt

sudo cp -r eclipse.XX.YY /opt


Create a desktop file in the location /usr/share/applications and install it:

sudo leafpad /usr/share/applications/eclipse.desktop


Copy following to the eclipse.desktop file.

[Desktop Entry]






Comment=Integrated Development Environment





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