Eclipse IDE is a platform for developing applications, particularly in Java and other programming languages like C, C++, Python, Perl, Ruby, etc. It is one of the most powerful and feature-rich IDE used by millions of developers around the world. .
Eclipse is a cross-platform IDE that you can install on Linux, as well as Windows and macOS. Let’s see how to install Eclipse IDE on various Linux distributions.
Install Eclipse IDE on Linux via the setup file
Eclipse provides an official setup file for all Linux distributions that you can install with a few simple commands. However, Eclipse requires Java to be pre-installed on your Linux distribution. Below are the commands to install Java on Linux:
To install Java on Ubuntu and other Debian-based distributions:
sudo apt install -y openjdk-11-jdk
On Fedora and other RPM-based distributions:
sudo yum install java-11-openjdk
On Arch Linux:
sudo pacman -S jdk11-openjdk
On openSUSE:
sudo zypper --non-interactive install java-11-openjdk-devel
Once you have Java installed, download the Eclipse IDE setup file.
Discharge: Eclipse
The setup file will be a TAR.GZ file that you can extract with:
tar -xvf eclipse-inst-linux64.tar.gz
This command will extract the contents of the file in the eclipse installer directory. Use the cd command to change the directory:
cd eclipse-installer/
Next, run the setup file using:
./eclipse-inst
This will open the following installer window:
Choose the Eclipse IDE package you want to install. Here we are installing Eclipse IDE for Java Developers. Then choose the installation directory for Eclipse IDE or leave the default selected and click Install.
The installer will now display the software user agreement for you to review and accept if you wish to continue. Click Accept now.
After that, the installation will begin. Once completed, click on the Launch button if you want to start Eclipse right away.
How to uninstall Eclipse IDE from Linux
If you no longer want to use the Eclipse IDE, you can remove it from your Linux machine. To uninstall Eclipse, go to your home directory and use the rm command to remove the Eclipse folder:
sudo rm -r eclipse*
To remove the application shortcut, run the following two commands:
cd .local/share/applications/
sudo rm *eclipse*.desktop epp*.desktop
Install Eclipse IDE from Snap Store
On all Linux distributions that support Snap, you can install the Eclipse IDE via its Snap package.
To do so, first install snapd on your Linux system, and then use the following command to install Eclipse:
sudo snap install eclipse --classic
After installing the Eclipse snap package, you can start it from the applications menu or use the following command:
eclipse
Uninstall the Eclipse Snap package
To remove the eclipse snapshot application when you’re done, run:
sudo snap remove eclipse
Install Eclipse IDE on Linux via Flatpak
If your Linux distribution supports Flatpak, you can also install Eclipse using its Flatpak package. For this, you will need to install Flatpak on your system if it is not already installed.
Then add the Flathub repository using the following command:
sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
You can now install the Eclipse IDE Flatpak package with:
sudo flatpak install flathub org.eclipse.java
Start Eclipse IDE from the applications menu or run the following command:
flatpak run org.eclipse.java
Uninstall the Eclipse Flatpak package
To uninstall the Eclipse IDE Flatpak, run:
sudo flatpak remove org.eclipse.Java
Using Eclipse IDE for the first time
After starting the Eclipse IDE for the first time, it will ask you to select a workspace directory to store your projects. You can leave the default workspace selected by Eclipse or choose a different directory. Then click on the Launch button to start working in the IDE.
Develop Java applications on Linux using Eclipse IDE
Using this guide, you will be able to install Eclipse IDE on your Linux machine. Once you’ve installed the Eclipse IDE, you’re ready to write, compile, and run your code. It comes with many features to help you structure your code in a readable and understandable way.
For Linux users, there are also other IDEs and code editors available such as Visual Studio Code, Sublime Text, Atom, Apache NetBeans, etc. You can also test these editors to determine which one best suits your requirements and preferences.