People who work with C or C++ use Eclipse CDT. When they need to work with Java too, then adding this support to Eclipse CDT is easy:
- Check if you have a Java Development Kit (JDK) installed. Else install one. I like to use the open source OpenJDK. I installed it using:
$ sudo apt install openjdk-7-jdk
- Open Help -> Install New Software. This opens a dialog where you can choose what plugins to install.
In the Work With dropdown, choose your Eclipse version. For example, I chose
Luna. The Software list below should get populated with all the software that can be installed to your Eclipse.
In this list choose Programming Languages -> Eclipse Java Development Tools. Choose Finish.
After installation, Eclipse will ask to be restarted. After the restart, you should be able to create and work with Java projects.
Tried with: Eclipse Luna 4.4.1 and Ubuntu 14.04