Possible Duplicate:
Build Eclipse Java Project from Command Line
I want to compile my Eclipse project using the command line.
Can anyone provide instructions?
Possible Duplicate:
Build Eclipse Java Project from Command Line
I want to compile my Eclipse project using the command line.
Can anyone provide instructions?
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.
Personally, I'd be using maven to set up my project and then using it to compile. Once your project is set up in maven, mvn eclipse:eclipse
to generate your eclipse project and mvn package
to generate your jar.