Installing Eclipse for Java via the Synaptic Package Manager
Install Synaptic Package Manager using Ubuntu Software Centre.
Install Eclipse packages via the Synaptic Package Manager by searching for “Eclipse-jdt” (without quotes).
Select eclipse-jdt from the packages list and the rest of the dependencies will also get selected.
Once that is done, click on Apply.
A Summary window will appear, click on the Apply button again.
Then wait till the Downloading Package Files is finished.
Run Eclipse via the Dash Home
DO NOT USE THE “Check for Updates” from the Help menu in Eclipse, this could lead to problems with the Java perspective or render the Eclipse platform unusable (error message). Although you can use the “Install New Software” option from the Help menu – its best not to.
PLEASE USE THE “Synaptic Package Manager” to do any “updates / upgrades” to Eclipse packages and plugins.
You can use the below commands (optional) to update and upgrade packages:
sudo apt-get update (password requested) sudo apt-get upgrade
Also accept any available updates from the Ubuntu Software Centre. Once this is done, a reboot of the Ubuntu system will be required.
Check if the Java perspective is available (see under File > New > New Project menu options).
JRE Runtime Environment
To add the run-time environment into Eclipse do the following:
a) Go to Windows > Preferences > Java
b) Select Installed JRE
c) Add a JRE by clicking on the Add button
d) Browse to the /usr/lib/jvm/java-7-openjdk-amd64 folder and select it.
e) Click on Finish to add the new JRE to Eclipse’s list of JREs.
Shutdown Eclipse once done.