How To Install Eclipse IDE on Ubuntu 18.04 LTS

0

Eclipse is a well-known, widely used Integrated Development Environment for developing JAVA application all around the world. It is written in C and Java and released under Eclipse Public License.

Eclipse is not only used for developing applications in various programming languages including COBOL, Ada, C, C++, Perl, PHP, Python, R, Ruby (including Ruby on Rails framework), Clojure, Scala, Groovy, and Scheme.

Development environments include the Eclipse Java development tools (JDT) for Java, Eclipse CDT for C/C++ and Eclipse PDT for PHP, among others.

With the support of plugins available in Eclipse Marketplace, you can extend the functionality of Eclipse.

Prerequisites

Switch to the root user.

su -

OR

sudo su -

Update the system repository index.

apt update

Install the wget package to download the Eclipse IDE from the internet over a terminal.

apt install wget

Eclipse requires Java JDK to be available on your machine. You can either install Oracle JDK or OpenJDK.

For this demo, I will use OpenJDK 8 here.

apt install -y openjdk-8-jdk

Want to use Oracle JAVA JDK, read:

READ: How to install Oracle JAVA JDK 10/8 on Ubuntu 18.04 LTS / 17.10

Verify the Java version on your machine.

java -version

Output:

openjdk version "1.8.0_162"
OpenJDK Runtime Environment (build 1.8.0_162-8u162-b12-1-b12)
OpenJDK 64-Bit Server VM (build 25.162-b12, mixed mode)

Download Eclipse

Download the latest version of Eclipse IDE (v 4.7) from the official page using a web browser or download the Eclipse package over a terminal using the following command (risk of being changed).

wget http://ftp.jaist.ac.jp/pub/eclipse/technology/epp/downloads/release/oxygen/3a/eclipse-java-oxygen-3a-linux-gtk-x86_64.tar.gz

Extract Eclipse package to your desired directory (Ex. /usr/).

tar -zxvf eclipse-java-oxygen-R-linux-gtk*.tar.gz -C /usr/

Symlink the eclipse executable to /usr/bin path so that users on the machine can able to use Eclipse.

ln -s /usr/eclipse/eclipse /usr/bin/eclipse

Create Launcher Icon for Eclipse in Ubuntu 18.04

Sometimes you may want to have Eclipse launcher icon in GNOME or Dash just like in the Start menu of Windows.

nano /usr/share/applications/eclipse.desktop

Use the following information in the above file.

[Desktop Entry]
Encoding=UTF-8
Name=Eclipse 4.7
Comment=Comment=Eclipse Oxygen
Exec=/usr/bin/eclipse
Icon=/usr/eclipse/icon.xpm
Terminal=false
Type=Application
StartupNotify=false

Start Eclipse IDE

From command line

eclipse

From GUI

Go to Activities >> Search for Eclipse.

Install Eclipse IDE on Ubuntu 18.04 - Launcher Icon for Eclipse IDE in Ubuntu 18.04
Install Eclipse IDE on Ubuntu 18.04 – Launcher Icon for Eclipse IDE in Ubuntu 18.04

Configure the workspace for Eclipse.

Install Eclipse IDE on Ubuntu 18.04 - Workspace
Install Eclipse IDE on Ubuntu 18.04 – Workspace

Eclipse IDE 4.7 running on Ubuntu 18.04:

Install Eclipse IDE on Ubuntu 18.04 - Eclipse 4.7
Install Eclipse IDE on Ubuntu 18.04 – Eclipse 4.7

That’s All.

Further Reading

You might also like

How To Install Eclipse IDE on Ubuntu 18.04 LTS

0