This article describes how to install the C/c++-eclipse development environment on Ubuntu 14.04 LTS.
First, download the latest version of Eclipse on eclipse.org (Eclipse IDE for C + + Developers-an IDE for C + + developers with Mylyn Integratio N
This article is eclipse-cpp-luna-sr1a-linux-gtk.tar.gz
The first step,
Unzip the above installation package into the directory you want to install, such as the/OPT directory
After the tar zxvf eclipse-cpp-luna-sr1a-linux-gtk.tar.gz is extracted in the/opt directory, an Eclipse folder is generated.
Step Two,
Attempting to start eclipse typically causes an error after startup because Eclipse needs to have a Java environment that supports its operation. Ubuntu does not install the JDK by default.
The third step,
To Oracle Oracle to download the latest version of the JDK, this article is jdk-8u31-linux-i586.rpm, note that although it is the i586 suffix, it can be run on the i386 machine.
So i386 you can rest assured that download.
To install the JDK, you can convert the RPM package (Rpm->deb) with alien (install sudo apt-get install alienfirst),
Alien-d jdk-8u31-linux-i586.rpm
After the conversion is complete, install the Deb package,
Dpkg-i Jdk1.8.0-31_1.8.031-1_i386.deb
The installation is complete. But we also have to configure it,sudo gedit ~/.bashrc
Added at the end:
Export java_home=/usr/java/jdk1.8.0_31
Export Jre_home= $JAVA _home/jre
Export classpath=.: $JAVA _home/lib/tools.jar: $JAVA _home/lib/dt.jar: $JRE _home/lib: $CLASSPATH
Export path= $JAVA _home/bin: $JRE _home/bin: $PATH
After saving, thesource ~/.BASHRC, can be effective (note the writing, do not overwrite the original path).
Fourth Step,
Try to query Java version, java-version, the result comes out two error message.
This is due to the fact that some of the installation packages have not been decompressed during the decompression of the JDK installation and do not know what the intentions are.
Switch to the/usr/java/jdk1.8.0_31 directory, there is a Lib, and the JRE, is the inside of the bag is in mischief.
We found the/usr/java/jdk1.8.0_31/bin inside the unpack200, this is a self-contained decompression tool, copy it to the above two sub-directories,
/usr/java/jdk1.8.0_31/lib and /usr/java/jdk1.8.0_31/jre/lib, then we can do it!
Before this, switch to root,Su-
Then Tools.pack rt.pack jsse.pack three packets to jar format in the above two directories respectively
./unpack200 Tools.pack Tools.jar The rest of the same.
This allows you to view the Java version information:
[Email protected]:~/downloads$java-version
Java Version "1.8.0_31"
Java (TM) SE Runtime Environment (build 1.8.0_31-b13)
Java HotSpot (TM) Server VM (build 25.31-b07, Mixed mode)
It means we've installed the JDK.
Next you can start Eclipse, switch to/opt/eclipse execution,./eclipse
Goodluck
How to install C/c++-eclipse on Ubuntu, and JDK installation, environment variable settings