Eclipse is one of the most popular open-source IDE (Integrated Development Environment) for software developers. It is popular for Java-based applications, also used for C/C++, PHP, and Perl and other web projects.
Eclipse is a really powerful IDE that supports many programming languages. It provides numerous plugins and extensions for enhancing the functionality of your Eclipse such as source code version control (git, svn), class diagram generator, GUI builder.
This tutorial will show you 2 methods to install Eclipse on Ubuntu 20.04 LTS machine.
In order to install Eclipse IDE, you have to install JRE (Java Runtime Environment) on your Ubuntu machine:
$ sudo apt update $ sudo apt install openjdk-14-jre
To verify that Java was successfully installed, let's run:
$ java --version
openjdk 14.0.1 2020-04-14 OpenJDK Runtime Environment (build 14.0.1+7-Ubuntu-1ubuntu1) OpenJDK 64-Bit Server VM (build 14.0.1+7-Ubuntu-1ubuntu1, mixed mode, sharing)
Install Eclipse by installer package [Method 1]
At the time of this writing, the latest version of Eclipse is: Eclipse IDE 2020-06. Eclipse can be downloaded via the browser on its official website https://www.eclipse.org/downloads/
By default, the installer package is downloaded into the directory '~/Downloads' with name: 'eclipse-inst-linux64.tar.gz'.
Or by using the wget command as:
$ wget https://download.eclipse.org/oomph/epp/2020-06/R/eclipse-inst-linux64.tar.gz
Let's extract the downloaded tarball file to the directory '/opt' by running the following command:
$ sudo tar -xf eclipse-inst-linux64.tar.gz -C /opt
In order to install Eclipse, launch the installer file 'eclipse-inst' by running the following command:
$ cd /opt/eclipse-installer $ sudo ./eclipse-inst
Eclipse packages window appears, let's choose your favorite package IDE.
For example, select the Eclipse IDE for C/C++ Developers then click INSTALL
Next, you have to accept the Eclipse Foundation Software User Agreement.
Now, your Eclipse IDE will be installing.
After the installation has completed, Eclipse is ready to be launched.
Eclipse installation by snap [ Method 2]
Installing Eclipse by snap package manager is the handiest installation method to bring the Eclipse integrated development environment to your Ubuntu machine.
$ sudo snap install --classic eclipse
In order to install an old version of Eclipse, you can use the apt package manager:
$ sudo apt install eclipse
Another simple way to install Eclipse IDE is using Ubuntu Software Center. Let's open the software center and search for Eclipse then click the Install button.
Create launcher icon
Once the Eclipse is downloaded and installed successfully, you may need to create a shortcut to launch your IDE. Using your favorite editor to create a file named 'eclipse.desktop' and enter the following lines to it:
[Desktop Entry] Name=Eclipse 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 Name[en_US]=Eclipse
Please note that the paths in lines 'Exec=' and 'Icon=' are depended on your system. You can find the path in Exec line by running command:
$ which eclipse
Now, let's enable the launcher icon:
$ sudo chmod +x eclipse.desktop $ sudo mv eclipse.desktop /usr/share/applications/eclipse.desktop
That's all. From now on, you can search for eclipse and launch it in the Applications center on your Ubuntu machine.
In this tutorial, we learned how to install the Eclipse IDE on Ubuntu 20.04. You can now begin to write your own codes to create many awesome applications with Eclipse.
Thanks for reading and please leave your suggestion in the below comment section.