Programming

How to install Eclipse IDE on Ubuntu

How to install Eclipse IDE on 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 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.

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

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

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

sudo apt update

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

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

Configure Oracle Java Installer

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

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

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

javac -version

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

Step 2. Save the package.

Save Eclipse File

The download is in progress.

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

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

eclipse-installer/eclipse-inst

Run Eclipse Installer

The installer should 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

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

Install Eclipse

Step 7. Accept the license agreement.

Accept Eclipse IDE License Agreement

Installation in progress.

Installation Progress

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

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.

Cele mai bune jocuri de linie de comandă pentru Linux
Linia de comandă nu este doar cel mai mare aliat al tău când folosești Linux - poate fi și sursa de divertisment, deoarece poți să o folosești pentru ...
Best Gamepad Mapping Apps for Linux
If you like to play games on Linux with a gamepad instead of a typical keyboard and mouse input system, there are some useful apps for you. Many PC ga...
Instrumente utile pentru jucătorii Linux
Dacă vă place să jucați jocuri pe Linux, este posibil să fi folosit aplicații și utilitare precum Wine, Lutris și OBS Studio pentru a îmbunătăți exper...