Go to the official website to download the JDK first.
Decompression is installed.
The environment variable is then configured in the ~/.BASHRC file. At the end of the file, add the following path, as follows:
Java_home=/home/username/jdk/jdk1.8.0_25
Java_bin=/home/username/jdk/jdk1.8.0_25/bin
Path= $PATH: $JAVA _home/bin
Classpath=/home/username/jdk/jdk1.8.0_25/lib
Then go to Eclipse's official website to download Eclipse C + + for Linux, of course, it contains the corresponding version of the CDT. (A lot of versions, what Galileo is a mess, it's annoying)
If the machine comes with Eclipse without CDT, go to the official website to download a good, be sure to download the corresponding version.
http://www.eclipse.org/cdt/downloads.php
There is also a problem running eclipse, and an error window pops up:
Version 1.6.0_33 of the JVM is not suitable for this product or greater is required.
In fact, in the launch configuration file in Eclipse to change the line, the JVM's path to add, the JVM small white know that the JDK contains, or not called the JDK (Java development Kit), many people ask, why do you need a JVM ah? I am not developing Java, I want to develop C + + AH? Big Brother, Eclipse itself is Java development, it does not how to run the JVM?
Well, that's all, the boot configuration file in Eclipse is the Eclipse.ini in the installation directory, which is added on the inside:
-vm
/home/username/jdk/jdk1.8.0_25/bin/java
Note that this parameter must be written in front of a-vmargs parameter, because the location of the virtual machine is not known, but also to the virtual machine to pass a fart parameters ah?!
The result is a successful test program for Hello World. By the time the project was set up, Toolchain chose GNU gcc.
References
http://www.iteye.com/topic/560534
http://xwz89314.blog.163.com/blog/static/4051000420107151218397/
http://blog.csdn.net/ashuai81/article/details/8068041
http://blog.csdn.net/leee101/article/details/3072093
Http://stackoverflow.com/questions/6502399/version-1-4-2-03-of-the-jvm-is-not-suitable-for-this-product-1-5-or-greater-is
Linux C + + development environment-----Eclipse