Automatic Installation for Online downloads:
Sudo apt-getinstall eclipse-CDT
Sudo apt-Get remove eclipse-CDT
1. Manual download
1.1java Environment
Download JRE (Java Runtime Environment ). Http://java.sun.com/javase/downloads/index.jsp)
Jre-7u3-linux-i586.gz
1.2 eclipse
Download the eclipse SDK. (Http://www.eclipse.org/downloads/) eclipse-SDK-3.7.2-linux-gtk.tar.gz
1.3 CDT
Download CDT. (Http://www.eclipse.org/cdt/downloads.php) cdt-master-8.0.2.zip
-------------------------------------- Method 1 ------ simpler ---------------------------------
Decompress the downloaded CDT, JRE, and eclipse files and place them under/usr/local/Java /.
Root @ Ubuntu:/usr/local/Java/eclipse # cp-r/usr/local/Java/jre1.7.0 _ 03/* Eclipse/JRE
In this way, you can run eclipse./eclipse and put CDT into eclipse.
Root @ Ubuntu:/usr/local/Java/eclipse # cp-r/usr/local/javacdt/plugins/Eclipse/
Root @ Ubuntu:/usr/local/Java/eclipse # cp-r CDT/Features/Eclipse/
----------------------------- Method 2 ---------------------------------------
1. Create a directory to store the installation package and the installation file: mkdir Java
2. Move the cdt jre and eclipse on the desktop to the path you created:
MV/home/sphone/desktop/*/usr/local/Java
3. Install JRE: tar-zxvf jre-7u3-linux-i586.gz,/usr/local/Java contains a jre1.7.0 _ 03 path
4. Set environment variables so that Linux can find JRE
VI/etc/profile
Export java_home =/usr/local/Java/jre1.7.0 _ 03
Export classpath =.: $ java_home/lib
Export Path = $ path: java_home/bin
Environment Variable enabling: Source/etc/profile
Check whether the installation is successful: Java-version
5. Decompress Eclipse: tar -zxvfeclipse-sdk-3.2.1-linux-gtk.tar.gz
Run./eclipse to check whether the installation is successful
6. Download the CDT and put it in a directory. I put it in the CDT (self-created) folder under the directory where eclipse is located. Then execute eclipse in eclipse help-install
Click Add in the work with column of new software to bring up add
In the repository dialog box, enter "name" as needed. I enter "CDT" and "location" as the path of the CDT.
Alternatively, you can use the links method to install the plug-in to facilitate plug-in management.
A. Create a folder named CDT in the eclipse directory (eclipse_home ).
B. decompress the content in the downloaded cdt-master-4.0.0.zip file to/eclipse_home/CDT/eclipse.
C. Create a folder named links in eclipse_home.
Add the file CDT. Link to the new links. The content of the file is
Path =/eclipse_home/CDT
D. Complete the installation of the CDT plug-in. Start eclipse and you will see more C and C ++ development environments.
/Eclipse_home in my Ubuntu is/usr/local/Java/eclipse