Eclipse builds J2EE + PHP + C/C ++ platform (using CDT and PDT)

Source: Internet
Author: User

Since learning J2EE, we hope to learn PHP and C ++ by myself recently.

Because eclipse is very skilled in J2EE, I hopeOnly eclipse can be used to complete the development environment of J2EE, PHP, and C/C ++.
However, eclipse does.
However, there is a problem. If you download the three ide versions of eclipse separately, it is equivalent to placing three eclipse versions on the hard disk, which is undoubtedly a waste.
As a result, waste wood is studying how to use eclipse to develop three languages at the same time.

In fact, it is also simple, as long as you use an eclipse masterProgramAnd then use plug-ins in other languages.
As for the selection of the main program, waste Diesel compared the list of functions of different versions of eclipse, and finally located in eclipse's J2EE IDE is this Eclipse IDE for Java EE developers (189 MB)
: Http://www.eclipse.org/downloads/download.php? File =/technology/EPP/downloads/release/Galileo/SR1/eclipse-jee-galileo-SR1-win32.zip(Because the domestic access to the eclipse link is unstable, we recommend that you use the BitTorrent to download it. This is faster)
Why is this version used? This version includes almost all functions of IDE of other versions. After using this version, you only need to mount the PDT and CDT on your own. No other plug-ins need to be installed.
Because eclipse is written in Java, to run eclipse, you must install the JDK environment. You can go to http://cn.sun.com to download the latest JDK.

AsJDK InstallationIn fact, it is very simple. The next step is to put the path in the root directory of the drive letter rather than the default address.
After installation, You need to modify the environment variable. Right-click the computer on the computer and select "environment variable" in "advanced". To add a java_home, the value is your JDK installation path, then, add "% java_home % \ bin" in the path (the path is separated from the preceding variable by a semicolon). It is also possible to directly add "path \ bin" to the path, however, we recommend that you create a java_home environment variable, because this variable may be used by some J2EE servers in the future.
Add a class_path with the value "."
Now the JDK development environment has been installed. Open cmd, enter Java-version in the command line, and press Enter. If JDK version is displayed, the installation is successful. (Note that if you have installed the Oracle database, when you enter this command line, the version number may be different from the version number you installed. This is because Oracle will insert its own JRE path in path. At this time, you only need to add the JDK path you installed to the front of the JRE path of Oracle, because the path is located from the past to the next .)

After JDK is installed, decompress eclipse and run it.
Now we start to install PDT.

PDT installation only needs to follow the official installation guide step by step to do it, Installation Guide address http://wiki.eclipse.org/PDT/Installation (see eclipse 3.5/Galileo/PDT 2.2-> from Update site)
It may be hard to understand English. Let me give a general description here.
1. Choose WINDOW> preferences> install/update> available software sites.
2. Add an update address http://download.eclipse.org/technology/dltk/updates-dev/2.0/ for dltk 2.0, such)

3. Add an update address for PDT 2.2: http://download.eclipse.org/tools/pdt/updates/2.2/interim/ (e.g)

4. go to help-> install new software. when you press PDT in work with, the PDT link you just added will appear. Select it, and then select 'runtime' feature in the following list:

5. Click Next to proceed to the next step.
6. Select "agree" here. (For example)

Next, click Finish to start the installation. After the installation is complete, you will be prompted to restart eclipse and select YES to restart. In this way, the eclipse PDT environment will be installed.
The next step is how to combine eclipse and web server. You can refer to this article.Article: Notes on setting up a php development and debugging environment using eclipse + easyphp + xdebug

The next step is to install CDT to make eclipse support C/C ++ development.
First download the CDT file: http://www.eclipse.org/downloads/download.php? File =/tools/CDT/releases/Galileo/Dist/cdt-master-6.0.1.zip. So download and install it .)
CDT mounting is similar to PDT. The difference is that the official update link is not applicable here. Select the. Zip package you just downloaded:
1. Choose WINDOW> preferences> install/update> available software sites and click Add.
2. Write "CDT 6.0" in name and click "archive" in the locationside. Select the. ZIP file of the CDT package you just downloaded.
3. Just like installing PDT, go to help-> install new software. And then select the added CDT 6.0.
Note that there are two cdt main features and cdt optional features. After verification, only installing main features is enough for C ++ development. You can choose not to install optional features first.
4. For subsequent installation, see the installation of PDT.
Now the CDT installation is complete.
However, eclipse does not support CDT. You also need a compiler. Here we can install mingw.

Click to download the attachment:MinGW-5.1.6.exe-155.12 KB


After the download is complete, run, select download and install, and set the installation component and installation path. Then, the program automatically downloads mingw and installs it on the computer.
After the installation is complete, remember to add "mingw installation path \ bin" to the path of the environment variable, such as c: \ mingw \ bin
Now mingw has been installed.
Go to eclipse and choose File> New> C ++ project to create a C ++ project. (if the project is not selected in the list, select it ).
Create a hello World C ++ Project (sample project of Hello World). The toolchains next to it are mingw. (For example)


Next, click Finish.

Right-click the project and choose run as> Local C ++ application to run the program?

So far, the J2EE + PHP + C/C ++ Development Environment built with eclipse Jee ide + CDT + PDT has been fully set up. Start your learning journey.

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.