Install Eclipse IDE on Ubuntu 18.04 | 20.04

Before installing Eclipse IDE on Ubuntu or Linux, you must have Java 8+ installed on your computer.

Complete the steps below to install the Eclipse IDE

  1. Go to Eclipse Official Download page and look for "Eclipse IDE for Enterprise Java Developers" and click on "Linux 64-bit". You will be redirected to the download page. Click on the download link.
  2. Next, open the terminal and navigate to the directory where you have downloaded the file. For this example, I have downloaded the file in Downloads directory.
  3. 
         cd Downloads
        
  4. Next, unzip the downloaded tar.gz file using the command given in the example below:
  5. 
         tar -xzvf eclipse-jee-2019-06-R-linux-gtk-x86_64.tar.gz
        
  6. Next move the unzipped eclipse folder to /opt location.
  7. 
        sudo mv eclipse /opt
        
  8. Run the following command on the terminal:
  9. 
       sudo gedit /usr/share/applications/eclipse.desktop
        

    It will launch an empty file. Copy and paste the followings into the empty file, as shown below:

    
        [Desktop Entry]
        Name=Eclipse
        Type=Application
        Exec=/opt/eclipse/eclipse
        Terminal=false
        Icon=/opt/eclipse/icon.xpm
        Comment=Integrated Development Environment
        NoDisplay=false
        Categories=Development;IDE;
        Name[en]=eclipse.desktop
        
  10. Next save the file and run following command on the terminal. This will automatically install this desktop file on your Ubuntu/Linux system.
  11. 
        sudo desktop-file-install /usr/share/applications/eclipse.desktop
    
  12. Now, finally run the following two commands. Go to /usr/local/bin and set up a symlink to /usr/bin.
  13. 
       cd /usr/local/bin
       sudo ln -s /opt/eclipse/eclipse
    

    The installation is complete.

After installation, you can launch Eclipse IDE from Applications menu by searching with the Eclipse keyword. When you open it for the first time, it will ask you to specify workspace, once done, main page will be loaded.