Home Programming How to install Eclipse IDE on Ubuntu

How to install Eclipse IDE on Ubuntu

by Hend Adel
Eclipse IDE Ubuntu

Eclipse is a popular Java Integrated Development Environment or IDE. It is written mostly in Java, and its high usage is seen for developing Java applications. Still, it may also be used to develop applications in other programming languages using plug-ins. If you are looking for a good IDE platform to design apps and manage code, then Eclipse IDE should be on your list.

Why IDE?

You don’t need an IDE to write a program. The good old simple text editors will suffice for simple applications that are easier to manage. But, as the program goes complex, it’s no brainer to have an IDE so that you can do things such as syntax highlighting, organizing the file structure, compiling, editing source code, and debugging.

Eclipse IDE Features

Eclipse Bash Editor Debugging

Eclipse Bash Editor Debugging

Eclipse is a great free and open-source platform built with an intuitive UI, and I highly recommend it due to these top features that come in handy while creating software.

  • It can offer fixes for simple programing mistakes when it detects them.
  • It lets you autoformat your source code using the Source > Format option.
  • It helps you clean up the imported statements in your source code.
  • Eclipse built-in dual-source view editor pane lets you compare two files graphically.
  • It provides abbreviations for common items by using Ctrl+Space while typing in the command.

Install & configure Eclipse IDE on Ubuntu

However, before starting in the installation steps, you need to make sure that your Ubuntu is updated using the following  commands:

sudo apt update
sudo apt upgrade

Installing Oracle Java on Ubuntu

Step 1. To install Eclipse on your machine, you need to install Java as a prerequisite. Add the following Oracle Java repository to your system repositories.

sudo add-apt-repository ppa:linuxuprising/java

Add Oracle PPA Repository

The below message indicates that some versions of Java are no longer available for download. Just press the “Enter” button to continue.

Press Enter To Confirm

Press Enter To Confirm

Step 2. Now let’s update the system repositories.

sudo apt update
Update System Repository

Update System Repository

Step 3. Next, install the Oracle Java installer using the below command:

sudo apt install oracle-java14-installer
Install Oracle Java Installer

Install Oracle Java Installer

Step 4. In the package configuration screen, press the “OK” button.

Configure Oracle Java Installer

Configure Oracle Java Installer

Step 5. Accept the license agreement by selecting the “Yes” option.

Accept License Agreement

Accept License Agreement

Step 6. Now you need to set the Oracle Java as default.

sudo apt install oracle-java14-set-default
Ensure Oracle Java Is Set To Default

Ensure Oracle Java Is Set To Default

Step 7. To ensure that the Oracle Java was installed successfully, execute the next command.

javac -version
Oracle Java Installed Successfully

Oracle Java Installed Successfully

Installing Eclipse

At this point, you should have installed Oracle Java on your machine. Our next step is to install Eclipse. Although the Ubuntu snap store lets you install Eclipse using the command below, I don’t recommend it as the version of the EclipseEclipse is old.

sudo snap install eclipse --classic

Recommended Method

Step 1. Instead of snap, let’s download the latest EclipseEclipse from the official source. From your favorite browser, open the official Eclipse IDE website. Then download the Eclipse package.

Download Eclipse IDE Package

Get Eclipse IDE

Get Eclipse IDE

Step 2. Save the package.

Save Eclipse File

Save Eclipse File

The download is in progress.

Download Inprogress

Download Inprogress

Step 3. After the download finishes, successfully extract the downloaded package using the next command.

tar xfz ~/Downloads/eclipse-inst-linux64.tar.gz
Extract Eclipse Package Content

Extract Eclipse Package Content

Step 4. Let’s run the Eclipse Installer using the following command:

eclipse-installer/eclipse-inst
Run Eclipse Installer

Run Eclipse Installer

The installer should start soon.

Eclipse Installer Will Start Soon

Installer Will Start Soon

Step 5. When the installer opens up, you can choose the version you need.

Select Eclipse IDE You Need To Install

Select Eclipse IDE You Need To Install

Step 6. Let’s install the Eclipse IDE for Developers.

Install Eclipse

Install Eclipse

Step 7. Accept the license agreement.

Accept Eclipse IDE License Agreement

Accept Eclipse IDE License Agreement

Installation in progress.

Installation Progress

Installation Progress

Step 8. After the installation completes successfully, you can launch it.

Launch The Installed Eclipse

Launch The Installed Eclipse

Configuring Eclipse

Step 1. Now to create a launcher for an application open the next file:

vi .local/share/applications/eclipse.desktop

Step 2. Copy the below content and paste it in the previous file. Do not forget to replace the USER_NAME with your username.

[Desktop Entry]
Name=Eclipse
Type=Application
Exec=/home/USER_NAME/eclipse/
Terminal=false
Icon=/home/USER_NAME/eclipse/icon.xpm
Comment=Integrated Development Environment
NoDisplay=false
Categories=Development;IDE;
Name[en]=Eclipse
Name[en_US]=Eclipse

Save the file and exit it.

Step 3. Finally, enter the following command to enable the shortcut icon.

sudo desktop-file-install eclipse.desktop

Conclusion

That’s all about installing and configuring Eclipse IDE on your Ubuntu system. I hope you liked the tutorial. What do you think of Eclipse? What’s the best feature in it that you like using it frequently? Do let our reader know in the comments below.

You may also like

Leave a Comment

fl_logo_v3_footer

ENHANCE YOUR LINUX EXPERIENCE.



FOSS Linux is a leading resource for Linux enthusiasts and professionals alike. With a focus on providing the best Linux tutorials, open-source apps, news, and reviews written by team of expert authors. FOSS Linux is the go-to source for all things Linux.

Whether you’re a beginner or an experienced user, FOSS Linux has something for everyone.

Follow Us

Subscribe

©2016-2023 FOSS LINUX

A PART OF VIBRANT LEAF MEDIA COMPANY.

ALL RIGHTS RESERVED.

“Linux” is the registered trademark by Linus Torvalds in the U.S. and other countries.