Installing Eclipse with Java and C/C++ on Windows

  1. Download the MinGW installer from and run the installer.

    1. accept the license agreement
    2. choose the default install location
    3. When it asks you to "Choose Components", check
      • MinGW base tools (or it might say "runtime")
      • g++ compiler
      • Java compiler (optional)
      • MinGW make
    4. The installer will download and install a bunch of stuff.
  2. Download the Java software development kit from and run the installer, accepting the license agreement and all the defaults.

  3. Download this zip file, unzip it, open the folder, and run the "p2installer" program. Specify the install directory "C:\Eclipse" (it doesn't really matter, but this works.) Accept the license agreement and all the defaults. One of the questions will be where (if anywhere) to put it in the Start menu; I recommend putting it somewhere in the Start menu.

  4. If the installation procedure didn't give you a desktop shortcut to Eclipse, make one.

  5. Double-click this shortcut, and you should see the Eclipse splash screen. It'll ask for a workspace location, defaulting to something like

    c:\Program Files\eclipse workspace
    c:\Documents and Settings\labuser\workspace
    . This should be a directory where you can store things. If you're installing Eclipse in a student lab with locked C: drives but writable D: drives, use something like "d:\workspace" instead, and don't check the box "Use this as the default and don't ask again", so users can put their workspaces on their floppies, or flash drives, or network drives, or whatever.

    If you're installing this on your own computer, pick a reasonable place for all your Eclipse work to live, e.g. "d:\classes\270\workspace". Do not pick an existing folder that has other stuff in it, as Eclipse will put lots of stuff into that folder and may get confused if it finds stuff that it didn't put there.

  6. Test the C/C++ installation as follows:
    1. In Eclipse, go to the "File" menu, then "New", then "C++ Project" if it's there. If not, choose "Project", then find "C/C++" in the list of wizards, click the "+" sign to expand it, and choose "C++ Project".
    2. Pick a project name like "hello"
    3. A dialog box will ask whether to open the C/C++ perspective. Answer "yes", and remember this decision.
    4. "File" menu, then "New", then "Source File".
    5. Pick a name like "hello.cpp".
    6. In the new file window, type
       	#include <iostream>
       	using namespace std;
       	int main () {
       	  cout << "Hello!" << endl;
       	  return 0;
    7. Press control-S to save and compile the program.
    8. In the "Project Explorer" pane, select the project ("hello").
    9. In the "Project" menu, select "Build Project". It should compile.
    10. In the "Run" menu, select "Run As"->"Local C/C++ Application".
    11. You should see a console pane near the bottom of the window with the word "Hello!"
  7. You should now have an Eclipse installation capable of Java, C, and C++ development.

  8. Get and install Prolog:
    1. download and run it, accepting the license and all the defaults. By default, it'll install into c:\Program Files\amzi\amzi_8-0-6.

    2. Run Eclipse. In the "Help" menu, choose "Install New Software", then "Add", then "Local", and browse to c:\Program Files\amzi\amzi_8-0-6\eclipse_install. If this doesn't appear in the main window, select it from the "Work with:" drop-down menu. Check the box and hit "Next"; accept the license and all the defaults. Eventually it should tell you it has installed the software and it "strongly recommends" that you re-start Eclipse. Do so.

  9. You should now have an Eclipse installation capable of C, C++, Java, and Prolog.

  10. Now you can delete a whole bunch of stuff that's cluttering up your desktop: