Eclipse IDE

Introduction

Eclipse is one of the oldest and fabulous IDE in modern time. We are writing our this post after practically installing Eclipse Oxygen on Ubuntu 16.04 LTS desktop. This post is actually for Java developers who are looking for solution to install Eclipse Oxygen version.

It is always best idea to read good information from official website. If you are newbie in technical field make a note of it. Hence, we are not writing more on Eclipse introduction (Here is the website address http://www.eclipse.org/  ).

To install Eclipse IDE in Ubuntu 16.04 LTS desktop following things are must require –

  1.  JDK (It is a Java package). [We are using OpenJDK here but you also have open choice to use Oracle JDK]
  2. Good internet speed.
  3.  And patience to read this post 🙂

History of encountered issue

In this section we are sharing about the issue which we encountered while installing Eclipse Oxygen on Ubuntu 16.04 LTS desktop. So just read for your information.

1. Problem while installing OpenJDK

Generally, it is a good practice to always install latest and stable any type of package. Hence, we did the same. First we tried installing the OpenJDK 9.x but found that Eclipse Oxygen version is not supporting.

Later we decided to try our luck with OpenJDK 8.x version and Eclipse Oxygen installation happened successfully.

2. Error: Sub-process /usr/bin/dpkg returned an error code (1)

In both OpenJDK 8.x and 9.x , we have faced similar issue while using apt install command . So given below is the error.

Errors were encountered while processing:
 /var/cache/apt/archives/openjdk-9-jdk_9~b114-0ubuntu1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Install Eclipse Oxygen on Ubuntu 16.04 Desktop

We are pretty straight writing the steps in this section. We hope that from above written paragraph on issue history , you guys will be able to pick some of the reason.

Step 1 : Install Java

We have selected OpenJDK 8.x version for Java . In your system ,type given below command.

sudo apt -o Dpkg::Options::="--force-overwrite"  install openjdk-8-jdk openjdk-8-source openjdk-8-jdk-headless

Step 2 : Make OpenJDK 8 version as default

First check, what are the Java packages already installed in your system. Use the given below command –

update-java-alternatives --list

In our system we have two Java packages,in your system it could be different.

Because in our system, we have two Java package available we will make java-1.8.0-openjdk-amd64 as our default java package.

sudo update-java-alternatives --set java-1.8.0-openjdk-amd64

Now check the Java version

java -version

Here is our output.

Step 3 : Download Eclipse Oxygen

Open your web browser and visit the website http://www.eclipse.org/downloads/

a. Click on “DOWNLOAD 64 BIT” button

Eciipse

b. In next screen, click on “Download” button

Save the downloaded package in some safer location in your system.

eclipse oxygen

 

c.  Untar eclipse-inst-linux64.tar.gz

Untar this package it will create a new folder called ‘eclipse’ in your login user home directory.

sudo tar -xvzf eclipse-inst-linux64.tar.gz -C /opt

d. Make eclipse directory items executable and change ownership

sudo chmod -R 755 /opt/eclipse/
sudo chown -R root:root /opt/eclipse/

e. Create Eclipse Desktop icon or launcher

We hae written a post on Create desktop launcher on Ubuntu 16.04 LTS already.You can use that method also.

In a quick way, create a new file in desktop name it as eclipse.desktop. Paste the contents as described in below section.

gedit ~/Desktop/eclipse.desktop

Copy and paste given below contents in file eclipse.desktop which you are creating.

#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Icon[en_IN]=/opt/eclipse/icon.xpm
Name[en_IN]=eclipse
Exec=/opt/eclipse/eclipse
Comment[en_IN]=Eclipse - IDE
Name=eclipse
Comment=Eclipse - IDE
Icon=/opt/eclipse/icon.xpm

f. Eclipse is ready

Now eclipse is ready to use. You can start creating your project by clicking on Eclipse Desktop icon.
Firstly it will ask to set location of your eclipse workspace which you can customise as per your wish. And later welcome page. Now you are all set to go and enjoy eclipse.

eclipse workspace

Eclipse Oxygen

Read Some More Articles

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.