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 | 18.04 LTS

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 | 18.04 LTS. This tutorial is tested on Ubuntu 16.04. But these concepts apply to a recent Ubuntu 18.04 LTS and beyond.

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 if you are updating or installing 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. Go this page: https://www.oracle.com/technetwork/java/javase/downloads/index.html
  3. Then click “Download” button for the latest version of Oracle SDK (version 11.0.1 as of updating this post)
  4. You will be taken to another page that looks like this:
  5. You will need to agree first to the conditions and then click on the .deb installer for Linux.
  6. Download it to your Ubuntu home download directory.
  7. Please take note of the filename of the installer, e.g .jdk-11.0.1_linux-x64_bin.deb
  8. Now launch your terminal on the downloads directory (where the installer is located), then run this command (make sure to use the correct filename!)
  9. Now you have just installed Java latest version. It’s time to configure Java as follows:
  10. It’s very important to use the correct version that corresponds to your Java installer version. For example, jdk-11.0.1. If you are using jdk-11.0.2 then, it should be sudo update-alternatives –install /usr/bin/java java /usr/lib/jvm/jdk-11.0.2/bin/java 2

  11. Then run this command also:
  12. This will auto-detect all Java installations in your computer including the latest version installed. You need to use the latest version and ignore the rest so make sure to type the number that corresponds to the latest version ( #2 in my case) see screenshot.

  13. Finally run these 3 commands in a row ( make sure to use the correct version in the paths that corresponds to the version you installed). e.g. 11.0.1 in my case.
  14. Finally check java version as follows:

  15. java -version
  16. You should get something like: It will show as java 11.0.1. Then you have it correctly installed!

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: https://eclipse.org/downloads/eclipse-packages/. 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: https://wiki.eclipse.org/Simultaneous_Release
    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.