using a makefile in an eclipse java project

if you have java code and rely on a makefile to compile, you can configure eclipse to build your project using your makefile as follows:
  1. create the java project in eclipse
    1. open eclipse.
    2. click file, new, project...
    3. choose java project.
    4. type a project name
    5. un-check use default location and click browse to find the root of your java project which contains your makefile
    6. click finish
  2. add make as a builder
    1. click on the project in the package explorer.
    2. click project, and then click properties.
    3. click builders, and then click new.
    4. choose program and click ok.
    5. in the location textbox, type "/usr/bin/make" (w/o quotes).
      1. warning:  if this is not the location of the "make" program on your computer, determine the location by typing "whereis make" in a terminal window.
    6. in the working directory section choose browse workspace.
    7. choose your project, and click ok.
    8. under arguments, type "all", or the appropriate label in your makefile, plus any other arguments you wish to pass to make.
i'd love to hear if this helped you.


  1. Yes. Definitely worked for me. I have a lot of nested projects in a complex folder hierarchy that are all built with "make -f . Your instructions helped me to invoke the make and get them built. Thanks!

  2. great, this was exactly what I was looking for. Thanks! :)

  3. Thanks for the help. I'm in the Coursera compilers course ( https://class.coursera.org/compilers/ ) and this just helped me to get my virtual machine setup to work on the assignment in eclipse instead of gedit as I had been working.

  4. works great :) thanks :)

  5. Thanks. this works great for my group's development needs. :)

  6. This was very helpful!!!

  7. Yes. Definitely works for me!

  8. Great. Worked for me too! Thanks

  9. This comment has been removed by a blog administrator.

  10. This comment has been removed by a blog administrator.

  11. hi I have been searching for this information, In the warning message on 5th step, what is a terminal window...because I could not find the location of make file in my system. Thanks.

    1. hello, please see here:
      unfortunately because there are so many different flavors of linux, there's no easy way to explain how to open the terminal for command line access.

  12. This also worked for me too, Thanks a ton.

  13. This comment has been removed by a blog administrator.