4

I'm running an Ubuntu 14.04 and want to install the Eclipse IDE for both Java and C/C++ programming. I installed the separate installation files from their official website. I followed this thread here. (The top answer)

The steps helped me install the Java IDE but I don't know what changes I should make to the procedure to install the C/C++ IDE.

Another thread here, recommended to install eclipse-cdt but the Eclipse version installed is outdated. (Doesn't allow me to install Pydev)

I have TWO questions:

  1. Can the C/C++ libraries be downloaded from within eclipse, like Pydev?

  2. If not, how do I install both IDEs without interfering with each other?

P.S. I commented this query in the first thread but got no reply, that is why I'm asking a fresh question!

SY_13
  • 486
  • easiest way is to use the eclipse installer see this answer http://askubuntu.com/questions/695382/how-to-install-eclipse-using-its-installer – Jeff Archer Jan 24 '16 at 15:20

3 Answers3

3

Your first question

No, you can't download the C/C++ libraries from within eclipse, like Pydev.


Your second question

  1. Install Eclipse JEE and Eclipse C/C++ in separate folders in /opt eg:

    /opt/eclipse-cpp
    /opt/eclipse-jee
    
  2. Create two different desktop files in ~/.local/share/applications

    • ~/.local/share/applications/eclipse_cpp.desktop

      [Desktop Entry]
      Encoding=UTF-8
      Version=1.0
      Type=Application
      Name=Eclipse C++
      Comment=Eclipse Integrated Development Environment
      Icon=eclipse
      Exec=/opt/eclipse-cpp/eclipse
      StartupNotify=true
      StartupWMClass=Eclipse-CPP
      
    • ~/.local/share/applications/eclipse_jee.desktop

      [Desktop Entry]
      Encoding=UTF-8
      Version=1.0
      Type=Application
      Name=Eclipse JEE
      Comment=Eclipse Integrated Development Environment
      Icon=eclipse
      Exec=/opt/eclipse-jee/eclipse
      StartupNotify=true
      StartupWMClass=Eclipse-Java
      
  3. During the first start of both Eclipse distributions, select a different workspace folder for each of them, eg

    workspace-cpp
    workspace-jee
    

    Alternatively you can change the workspace folder in Eclipse itself via File > Switch Workspace

Now you can use both distributions in parallel.

enter image description here

A.B.
  • 90,397
2

You can install eclipse from the software center and then open the terminal and type:

sudo apt-get install eclipse eclipse-cdt g++  
0

A better way to do it is to use umake because you'll get the very latest build. sudo apt install will only get you the build that's currently available from the repository, which could be surprisingly old.

To install umake:

sudo add-apt-repository ppa:ubuntu-desktop/ubuntu-make  
sudo apt update  
sudo apt install ubuntu-make  

Then to get eclipse (2018/19) at the moment:

umake ide eclipse

For java EE:

umake ide eclipse-jee

For C/C++:

umake ide eclipse-cpp

For PHP:

umake ide eclipse-php

http://linuxhackr.com/eclipse-ide-on-ubuntu/