ubuntu10.4 building an Eclipse for C + + environment

Source: Internet
Author: User


The following actions: After the installation is completed, using Eclipse to build C + + project, the direct compilation can be run;
Description
(1) It is not recommended to use the download eclipse for Java version and CDT to build the environment, because I did not install the success;
(2) Netizens have said that Ubuntu installed eclipse will be very card, it is true, but can add memory to the virtual machine to 2G, so that the use of the card;


0: Download Eclipse C + +version, and the latest version of the JDK, it is highly recommended to download Eclipse forC++version, because the version of the CDT and other plugins are already included, the JDK download the latest version on the line, it is recommended not to download only the JRE;1: Delete the system default Jdksudo apt-GetPurge openjdk*2: Modifying environment variables sudo gedit/etc/Profile #SetJava Environment # export Java_home=/home/share/tools/jdk1.8. 0_45 # Export Jre_home=${java_home}/JRE # Export CLASSPATH=.:${java_home}/lib:${jre_home}/Lib # export PATH=${java_home}/Bin: $PATH Description:/home/share/tools/jdk1.8.0_45 is where my software is stored and can be stored in/user/lib/in3: Configured as default JDK version sudo update-alternatives--install/usr/bin/java Java/home/share/tools/jdk1.8.0_45/bin/java -sudo update-alternatives--install/usr/bin/javac Javac/home/share/tools/jdk1.8.0_45/bin/javac -What this means is to create two soft connections: [email protected]:~$ ll/usr/bin/Java lrwxrwxrwx1Root root A -- to- A +: -/usr/bin/java-/etc/alternatives/java*[email protected]:~$ ll/etc/alternatives/Java lrwxrwxrwx1Root root - -- to- A +: -/etc/alternatives/java,/home/share/tools/jdk1.8.0_45/bin/java*with these two soft connections, the local library is connected to the/usr/bin/Java, because the application can call the library itself, 300 is the meaning of the priority, the larger the higher the number;4: Replace the system version sudo update-alternatives--The config Java system lists the various JDK versions as follows: sudo update-alternatives--Config Java # has3Candidate can be used to replace Java (provides a/usr/bin/Java). # # # Select Path Priority status #------------------------------------------------------------ # *0/usr/lib/jvm/java-6-Openjdk/jre/bin/java1061Auto Mode #1/usr/lib/jvm/java-6-Openjdk/jre/bin/java1061Manual Mode #2/usr/lib/jvm/java-6-Sun/jre/bin/java theManual Mode #3/usr/lib/jvm/java-7-Sun/bin/java -Manual Mode # # # to maintain the current value [*] Press ENTER, or type the number you selected:3# Update-alternatives: Using/usr/lib/jvm/java-7-sun/bin/java to provide/usr/bin/Java (Java), in manual mode. 5: Test Java-version (displays the following information indicating that the configuration was successful) Java version"1.7.0"Java (TM) SE Runtime Environment (build1.7.0-b147) Java HotSpot (TM) Client VM (Build21.0-B17, Mixed mode)

ubuntu10.4 building an Eclipse for C + + environment

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.