Wiki
Clone wikiscl-manips-group / install / Eclipse
How to install and start working with Eclipse
Install Eclipse
Download it and save it in your home\Documents folder.
Go to the eclipse download page and choose 'Eclipse IDE for C/C++ Developers' for your operating system (32-bit or 64-bit linux). Now download it to your Home/Documents folder.
Open a terminal (control+alt+t) and navigate to the folder to where you downloaded Eclipse (most likey Home/Downloads):
cd ~/Downloads
To unpack it for example to your Home/Documents folder, use this command (depending on the actual version your downloaded, this might needs to be slightly adapted):
tar -zxf eclipse-linuxtools-indigo-SR2-incubation-linux-gtk-x86_64.tar.gz -C ~/Documents
You can run it now from there, the '&' symbol avoids, that the terminal waits till the application is closed again:
cd ~/Documents/eclipse ./eclipse &
If you have not installed the OpenJDK or the Oracle JDK, you will be prompted to do so, before you can start Eclipse. Installation instructions for this you can find in the section below.
If you want to be able to find Eclipse in your dashboard search and also want the the Eclipse icon to appear in the dashboard, when it is running (not just a question mark), you need to create the following file and edit it:
sudo gedit /usr/share/applications/eclipse.desktop &
Write the following information in that file and save it:
[Desktop Entry] Encoding=UTF-8 Name=Eclipse Comment=Eclipse IDE Exec=/home/my-usr-name/Documents/eclipse/eclipse Icon=/home/my-usr-name/Documents/eclipse/icon.xpm Terminal=false Type=Application Categories=GNOME;Application;Development; StartupNotify=true
Finally, do a clean command on Eclipse, then you should see the Icon in the taskbar and also find it using the dashboard search:
./eclipse -clean
Install OpenJDK or OracleJDK
to see what is installed already:
which java
and which version you are running:
java -version
If this shows, you already have Java JDK installed, then just skip this section and go on further down with the Eclipse Configuration. If you need to install open source java or oracle java, go ahead with the upcoming instructions:
Open JDK
The Open Source implementation of the Java Developer Kit is available at the Ubuntu Software Center or directly with apt-get. Compared to the Oracle version it is obviously open source, but comparably slower. It is up to you, what you prefer.
Search either for 'openjdk' in the Software Center and install it there or type in your console:
sudo apt-get install openjdk-7-jdk
Oracle JDK
The Oracle JDK is faster than the open source version, but proprietary. It can be installed after doing a few preparatory steps:
If openjdk ist already installed, you could remove openjdk, if it is already installed on your machine or alternatively you could choose the java version you want use after installing the proprietary Oracle Version.
Choosing which version to use has to be done with the following command:
update-alternatives --help
If you want to just un-install openjdk, run the following command from your terminal
sudo apt-get purge openjdk*
You would now go ahead install oracle-java7, but you most likely will get an error message of this sort:
Download done. sha256sum mismatch jdk-7u3-linux-x64.tar.gz Oracle JDK 7 is NOT installed. dpkg: error processing oracle-java7-installer (--configure): subprocess installed post-installation script returned error exit status 1
Therefore, first do some more clean-ups:
Remove old installer files:
sudo rm /var/lib/dpkg/info/oracle-java7-installer*
Search for remainders of old java installers:
sudo apt-get purge oracle-java7-installer*
Also get it out of your apt-sources list:
sudo rm /etc/apt/sources.list.d/*java*
Update your repository library:
sudo apt-get update
Now you can go ahead and install Oracle Java 7 by adding the following repository:
sudo add-apt-repository ppa:webupd8team/java
Update your repository library:
sudo apt-get update
Install Java7:
sudo apt-get install oracle-java7-installer
Running the following commands will now tell you, if Java has been installed:
which java
and which version you are running:
java --version
Again, as a reminder, to change which version to use (Open or Oracle):
update-alternatives --help
Annotations
If you have the idea, that installing a package went wrong and you are not sure, after trying to uninstall it again, if all the dependencies to that package are also gone, you can clean out your repository by using the following two commands:
sudo apt-get autoclean
sudo apt-get autoremove --purge
Updated