PHP Developer

My notes and thoughts about Linux, WordPress, PHP and many more.

How to install or update Eclipse PDT (PHP Development Tools ) to latest version in Ubuntu 16.04

Eclipse is an open source IDE that can used for PHP development. This tutorial shows how to install and update Eclipse in latest Ubuntu 16.04 LTS.

Install latest Java version first

To get the speed benefits of using Eclipse, you need to update to the latest Java version. This is recommended whether you are installing or updating Eclipse.

  1. Update your computer software to the very latest version. If you are using LXDE/Lubuntu, this is usually done in Menu -> Software Updater.
  2. For best result, you should be using latest Java version. Run this in the terminal to add the Java PPA:

    Press Enter until you are done ( you should see “OK” at the end).
  3. Let’s install Java 9 which is the latest version today (January 20, 2018). In the terminal, enter it as:

    When java 10 or future versions will be released, you will simply change the number. For example:

    However if you get an error:

    Try this step:

    The above command will remove package, then auto-remove any unneeded package:

    Then you need to remove the PPA since its not anymore used:

    The cause of this error is that you are installing a wrong Java in your computer. Take note there are two possible versions of Java that you can install. These are Oracle JDK (the one illustrated previously) and OpenJDK. You cannot mix this two.

    So if your computer is using older version of OpenJDK then you should install OpenJDK latest version for compatibility.

    You can check if you are using OpenJDK, type:

    If you are using OpenJDK, you should see an output something like:

    Where xxx are version numbers.

    If you are using Oracle JDK, you should see an output something like:

    Now if you are using Oracle JDK, the above procedures should work for you pretty well. In case you’ve got an error, you need to use the OpenJDK installer if your computer is already using OpenJDK:

    Then autoremove any unneeded packages during this installation:

    Then check again if you now have Java 9:

    You should get something like:

Installing Eclipse

Now Java is updated, you need to install Eclipse:

IMPORTANT: This procedure should only be used when Installing Eclipse for the first time. This procedure should not be used for updating Eclipse.

  1. Download the Eclipse Installer here: Make sure to select 64-bit if you are using computer is using 64-bit.
  2. Once downloaded, right click on the package and click “Extract Here.”. A folder named as eclipse-installer will be extracted.
  3. Open a terminal and navigate to your Downloads directory where the Installer is downloaded and extracted. Run this command to go inside the Installer folder:
  4. Run this command:
  5. Select “Eclipse for PHP developers” and confirm that you are installing at your preferred path (usually home directory) and then click Install

  6. It will take some time to download the package depending on your Internet connection. Also if it ask you to accept certificates, go ahead and check all of those then accept.
  7. Finally once its installed, you should be able to see the Launch button:

Adding Eclipse Icon to Menu -> Programming

It would be useful to have Eclipse Icon under “Programming” such as below:

  1. Create a text file
  2. Paste the following content below:

  3. Save it as eclipse.desktop
  4. Copy this file to /home/replace_with_your_ubuntu_username/.local/share/applications/ directory

It will now appear under “Programming” section in your Ubuntu menu.

Updating Eclipse

To update Eclipse, the following are the procedures:

  1. Launch your older version of Eclipse.
  2. Go to Help -> Install New Software
  3. Under Available software, click Add
  4. Enter the name and the URL of the repository, e.g.

    You will get this URL from this page:
    Under release name, find the current release (“Oxygen” as of the time this post is written). Then click P2 Repository.

  5. Click OK and then wait until its finished loading contents. You can click cancel and don’t install anything for now. Then restart Eclipse.
  6. Once restarted, go again to Help -> Install New Software -> click “Manage”, you should see something like “Oxygen” latest release being added there.
  7. Finally go to Help -> Check for Updates. Complete this process and it may time depending on the speed of your Internet connection. At the end of this process, you will have your Eclipse updated. You can see this in Help -> About Eclipse after restarting.

Known issues

If after installing Eclipse using Installer wizard then clicking the “Launch” button. You will see this error:

This is usually caused by wrong Eclipse update procedure. The solution is to simply go to /home/eclipse/ directory. Find the latest directory that is created there. This is usually the Eclipse folder that you have just installed that is providing an error.

Delete the just newly installed Eclipse directory (inside the red box in the screenshot below) and leave your old Eclipse installation intact:

Once deleted, you can follow the Eclipse update procedure above.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url=""> 

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