How to Install Eclipse on Ubuntu Linux

This post shows students and new users how to install Eclipse IDE on Ubuntu Linux. Eclipse is a cross-platform, wildly popular Java integrated development environment (IDE) that you can easily install and manage your Java based projects.

Eclipse comes with plugins to extend its functionality to support programming languages such as PHP, JavaScript, C++ and more. If you want a simple to use IDE platform to build you next application, then you might want to take a look at Eclipse.

Eclipse packages are available in Ubuntu default repositories. However, the version available in the default repositories are outdate. Below we’ll show you how to get the latest version installed easily.

Also, for students and new users learning Linux, the easiest place to start learning is on Ubuntu Linux. Ubuntu is the modern, open source Linux operating system for desktop, servers and other devices.

For more about Eclipse, check its homepage.

To install Eclipse on Ubuntu, follow the steps below:

How to install OpenJDK on Ubuntu Linux

Because Eclipse is a Java based IDE, you’ll need Java runtime environment (JRE) to be installed in order to run it. You’ll need to install OpenJDK package with JRE. If you haven’t install OpenJDK, use the link below.

How to install OpenJDK on Ubuntu

After installing OpenJDK above, run the commands below to install JRE.

sudo apt update
sudo apt install default-jre

The commands above will update Ubuntu package index and install OpenJDK and JRE packages to support Eclipse.

How to install Eclipse from Snap

After installing Java JRE above, run the commands below to install Eclipse from Snap. Snaps are containerized software packages that are simple to create and install. Snap applications are packaged with all their dependencies to run on all popular Linux distributions from a single build which allow them to update automatically and roll back gracefully.

sudo apt install snap
sudo snap install --classic eclipse

The commands above will install the latest version of Eclipse from Snap.

When you run the commands above, after a successful installation, you should get similar message as the one below.

eclipse 2019-12 from Snapcrafters installed

Once the installation is done, you can start it typing eclipse in your terminal or by clicking on the Netbeans icon from the Activities -> Eclipse.

How to install Eclipse manually on Ubuntu

If the first method of above is not what you want, you can manually download Eclipse installer and install the package. Eclipse has its installer you can use to install it on Ubuntu Linux.

First, go to the link below to download the installer. At the time of this post, the current version is 2021-09.

Download Eclipse Installer

When you click on the Download link to download the installer, it will ask what to do with the file. Choose the save option. By default, when you download via Firefox, it automatically saves in your Downloads folder.

Once the file is downloaded and saved in your Downloads folder, run the commands below to extract it.

tar xfz ~/Downloads/eclipse-inst-jre-linux64.tar.gz

After extracting the file, run the commands below to launch the installation wizard. The installer will help you install the version


Choose the the package you want to install. Usually the package for the language you will be building your programs.

On the next screen, choose the version of OpenJDK installed using the drop-down option. Install installation folder can remain the default.

After a brief moment, the installation should complete and Eclipse ready to be used. Click the Launch button to open Eclipse.

If you installed via the manual option, you may need to create a desktop icon to launch the program. You can run the commands below to create a simple desktop icon for Eclipse.

nano ~/Desktop/eclipse.desktop

Next, copy and paste the content below into the file and save

[Desktop Entry]
Name=Eclipse IDE for Java Developers - 2021-09
Exec=env GTK_IM_MODULE=ibus /home/richard/eclipse/java-2021-09/eclipse/eclipse

Save the file and exit.

Then run the commands below to make it executable.

chmod +x ~/Desktop/eclipse.desktop

Replace the highlighted username (richard) with your own account name. also, the Exec = location and icon.xpm should depend on where Eclipse got installed on your system.

Save the file and exit.

If that doesn’t work, right-click the icon on the Desktop and select Allow Launching.

That will allow you to launch Eclipse from your desktop.

That should do it!


This post showed you how to install Eclipse on Ubuntu Linux. If you find any error above or have something to add, please use the comment form below.