- How to Install Eclipse on Ubuntu Linux
- How to install OpenJDK on Ubuntu Linux
- How to install Eclipse from Snap
- How to install Eclipse manually on Ubuntu
- How to Install Eclipse IDE on Linux
- Prerequisites
- Installing Eclipse on Linux
- How to Install Eclipse IDE from the Snap Store (Terminal)
- How to Install Eclipse IDE using the Eclipse Installer
- Starting Eclipse
- From the Terminal
- From the Application Finder
- From the Desktop Shortcut
- Conclusion
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 your 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 outdated. Below we’ll show you how to get the latest version installed easily.
Also, for students and new users learning Linux, Ubuntu Linux is the easiest place to start learning. Ubuntu is the modern, open-source Linux operating system for desktops, 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 a Java runtime environment (JRE) to be installed to run it. You’ll need to install the OpenJDK package with JRE. If you haven’t installed OpenJDK, use the link below.
After installing OpenJDK above, run the commands below to install JRE.
sudo apt update sudo apt install default-jre
The commands above will update the 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 a similar message as the one below.
eclipse 2019-12 from Snapcrafters installed
Once the installation is done, you can start it by typing Eclipse in your terminal or clicking on the Netbeans icon from Activities -> Eclipse .
How to install Eclipse manually on Ubuntu
If the first method above is not what you want, you can manually download the Eclipse installer and install the package. Eclipse has an 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.
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
~/eclipse-installer/eclipse-inst
Choose 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. The install installation folder can remain the default.
After a brief moment, the installation should be complete and Eclipse ready to be used. Click the Launch button to open Eclipse.
If you installed it via the manual option, you might 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] Type=Application Terminal=false Encoding=UTF-8 Version=1.1 Name=Eclipse IDE for Java Developers - 2021-09 Exec=env GTK_IM_MODULE=ibus /home/richard/eclipse/java-2021-09/eclipse/eclipse Categories=Development;IDE; Icon=/home/richard/eclipse/java-2021-09/eclipse/icon.xpm
Then run the commands below to make it executable.
chmod +x ~/Desktop/eclipse.desktop
Replace the highlighted username ( richard ) with your account name. also, the Exec = location and icon.xpm should depend on where Eclipse got installed on your system.
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.
This post showed you how to install Eclipse on Ubuntu Linux. Please use the comment form below if you find any errors above or have something to add.
Richard W
I love computers; maybe way too much. What I learned I try to share at geekrewind.com.
How to Install Eclipse IDE on Linux
Ransomware recovery test drive: This technical workshop is designed to take you behind the scenes and shows you how to adopt strategies to automate recovery, ensuring you’re ready to become a recovery hero. REQUEST YOUR LAB
Eclipse is a popular Integrated Development Environment (IDE) that offers a ton of features. But installing Eclipse can be quite the challenge – especially on Linux.
This guide aims to simplify that task by providing clear and concise instructions on how to install Eclipse IDE in Ubuntu.
By the end of this guide, you should have a working installation of Eclipse that you can use to develop your applications.
Prerequisites
This hands-on tutorial requires you to have the following items so that you may follow along with the examples seamlessly.
- Your Linux computer must have Java installed. This tutorial will be using OpenJDK 11.0.15.
- You must have access to the root account or an account with sudo privileges. This guide uses a root account to execute commands.
Installing Eclipse on Linux
The Eclipse package is not available in the Ubuntu package repository as of this writing, which means you cannot install Eclipse via apt or the Software Manager. Don’t worry; there are several ways to install the Eclipse IDE.
How to Install Eclipse IDE from the Snap Store (Terminal)
Eclipse is available in the Snap Store, so you can install it with the snap command. If you’re unfamiliar with Snap, it’s a package manager for Linux that allows you to install and update applications with a single command.
Snaps are convenient to install and update. They are safe to run and isolated from the rest of your system, so they don’t put your system at risk.
While Snap is an excellent app source, the Eclipse version available in the Snap store might not be the latest one.
1. First, open a terminal window on your computer and run the below command to confirm that Snap is installed.
If Snap is available on your system, you will see the version information in the result.
2. If Snap is not installed, run the below command to install.
3. Create a symbolic link between /var/lib/snapd/snap and /snap. Doing so gives Snap apps access to your home directory after the installation.
ln -s /var/lib/snapd/snap /snap
4. Now, update the Snap package list by running the below command.
5. Run the following command to install the latest stable version of Eclipse. This command downloads the latest stable version of Eclipse from the Snap store and installs it on your system.
snap install --classic eclipse
The output below shows that you have successfully installed Eclipse IDE from the Snap store. The version number may be different depending on when you installed it. In this example, the Eclipse version from Snap is 2019-12 at the time of writing.
6. At this point, you have successfully installed Eclipse IDE from the Snap store. To launch Eclipse, click on the Activities tab in the top left corner of your screen and search for Eclipse.
How to Install Eclipse IDE using the Eclipse Installer
If you want the latest and greatest, install the official package from the Eclipse website. The version available on the official Eclipse website is always the latest one.
Compared with the Snap installation method, installing the official package requires more steps. But don’t worry. This section will walk you through the installation process step by step.
To install Eclipse from the official Eclipse website, follow these steps.
1. Open the Eclipse download website using your web browser.
2. Click the appropriate download link for Linux, as shown below. By default, the browser will download the file to your Downloads folder (~/Downloads).
3. Extract the downloaded archive file using the commands below. These commands extract the contents of the package to the /opt directory.
You can choose any location you want to extract the file. But /opt is a common directory for optional software packages, so it’s a good choice.
The -xvzf options tell tar to (x) extract the (f) file through (z) gzip and display the progress (v).
cd /opt tar -xvzf ~/Downloads/eclipse-inst-jre-linux64.tar.gz
4. The installer extracts to the eclipse-installer subdirectory. To confirm the sub directory exists, run the below command.
5. Change the working directory to the eclipse-installer subdirectory.
6. Now that you are in the eclipse-installer directory, run the ./eclipse-inst file to launch the installer.
7. On the Eclipse installer window, click the Eclipse IDE type you wish to install. This example installs the Eclipse IDE for Java Developers.
8. Select your Java version and the installation directory on the next screen. The default Java version and installation directory are acceptable in most cases.
Tick the two checkboxes to launch Eclipse using the start menu and the desktop icon. Click the Install button to start the installation process.
9. Next, click Accept Now on the Eclipse Foundation Software User Agreement page.
10. Review the Licenses and click Accept to proceed.
The status changes to Installing.
11. After the installation, click the exit button and No to exit the installer.
Starting Eclipse
You’ve completed learning how to install Eclipse IDE. Depending on which installation method you used, there are a few ways to start the Eclipse IDE.
From the Terminal
If you installed Eclipse through the Snap Store, one way to start the Eclipse IDE is by running the below command in the terminal.
Note: This method does not apply if you installed Eclipse IDE using the Eclipse installer.
From the Application Finder
Most Linux desktop environments have a search or application finder that allows you to search for an application and launch it.
For example, in Ubuntu GNOME, click the Activities menu and type “eclipse” to search for the Eclipse IDE.
Another example on the XFCE desktop, click the Application Finder icon on the dock. Type “eclipse” in this search bar to find the Eclipse IDE app and click Launch.
From the Desktop Shortcut
If you installed Eclipse IDE using the Eclipse installer, the installer automatically creates a desktop shortcut for you. All you need to do is double-click the icon to launch the Eclipse IDE.
The Eclipse IDE Launcher asks you to specify the workspace directory. Choose the default location or browse to a different one as you wish. This workspace will store all your project files, including the preferences. Once you’ve selected the workspace location, click the Launch button.
Eclipse will now launch with your selected workspace. You will see the welcome screen when Eclipse launches successfully, as shown below. You can now start using Eclipse.
Conclusion
A popular IDE for Java development, Eclipse comes packed with features to help make your life as a developer easier. In this guide, you have learned the different methods to install Eclipse on Linux and how to launch it.
Are you looking to extend the Eclipse IDE features? The Google App market is a great place to start looking for plugins to add to your Eclipse installation. With over 1000 plugins available, you will find something that will help your development workflow.
Have you used Eclipse before? What are some of your favorite features? Let us know in the comments below!
Hate ads? Want to support the writer? Get many of our tutorials packaged as an ATA Guidebook.