Possible Duplicate:
Build Eclipse Java Project from Command Line
I want to compile my Eclipse project using the command line.
Can anyone provide instructions?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This SO Question has an answer that explains how to do it.
I just want to add that it is a bad idea from a couple of respects:
If you wire this into your build scripts, you are tying your project to the Eclipse IDE. If someone else who prefers (say) NetBeans has to take over the project, you are making life hard for them. Even more so if this is an open source project.
You are potentially make life difficult for yourself too. For instance, suppose that you needed to do an emergency rebuild on a machine that didn’t have Eclipse installed, and you couldn’t install it for some reason.
If you are using Maven (or Ant) in your project, then running the build tool directly from the command line will be faster. And in the case of Maven , running the build tool directly will (in my experience) give you more consistent builds than using embedded Maven.
If you are not familiar with Maven or Ant already, you should learn about them rather than trying to use an IDE as a batch build tool.