Cent-OS6.0 install eclipse (C ++)

Source: Internet
Author: User

1. Install JDK

1. Uninstall the built-in openjava of centos

<1> run the command "rpm-Qa | grep Java", "rpm-Qa | grep JDK", "rpm-Qa | grep jcj" to find an existing package.

<2> run the command "rpm-e -- nodeps jdk-1.7.0_17-fcs.x86_64" to uninstall the package above, jdk-1.7.0_17-fcs.x86_64 installation name

2. Create a directory and install JDK

# Mkdir/usr/Java

# Rpm-IVH jdk-7u17-linux-x64.rpm

The installation is complete. If the following prompt is displayed, skip this step. the installation is successful. this is because your RPM package has directly loaded these files into the jar package, which is not found during unpacking and does not affect normal use.
Unpacking jar files...
Rt. jar...
Error: cocould not open input file:/usr/Java/jdk1.7.0 _ 17/JRE/lib/RT. Pack
JSSE. jar...
Error: cocould not open input file:/usr/Java/jdk1.7.0 _ 17/JRE/lib/JSSE. Pack
Charsets. jar...
Error: cocould not open input file:/usr/Java/jdk1.7.0 _ 17/JRE/lib/charsets. Pack
Tools. jar...
Error: cocould not open input file:/usr/Java/jdk1.7.0 _ 17/lib/tools. Pack
Localedata. jar...
Error: cocould not open input file:/usr/Java/jdk1.7.0 _ 17/JRE/lib/EXT/localedata. Pack

3. Configure Environment Variables

<1> # vi/etc/profile
<2> Add the following lines at the end:
Export java_home =/usr/Java/jdk1.7.0 _ 17 // note that jdk1.7.0 _ 17 indicates the installed JDK directory.
Export classpath =.: $ java_home/JRE/lib/RT. jar: $ java_home/lib/dt. jar: $ java_home/lib/tools. Jar
Export Path = $ path: $ java_home/bin
<3> # reboot // restart the machine. The configuration takes effect.

2. Install eclipse

1. Install C ++

# Yum install GCC gcc-C ++

2. decompress and download Eclipse IDE for C/C ++ developers from the official website, including CDT. No additional installation is required.

3. compile C ++

1. Create a new C ++ project and set the workspace path

2. An error may be reported during the first running: "launch failed, binary not found". If you build the project, you can run it again.

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.