Build Eclipse Java Project from Command Line

You can build an eclipse project via a workspace from the command line:

eclipsec.exe -noSplash -data "D:\Source\MyProject\workspace" -application org.eclipse.jdt.apt.core.aptBuild

It uses the jdt apt plugin to build your workspace automatically. This is also known as a ‘Headless Build’. Damn hard to figure out. If you’re not using a win32 exe, you can try this:

java -cp startup.jar -noSplash -data "D:\Source\MyProject\workspace" -application org.eclipse.jdt.apt.core.aptBuild


Several years ago eclipse replaced startup.jar with the “equinox launcher”

On Eclipse Mars (MacOX):

java -jar /Applications/ -noSplash -data "workspace" -application org.eclipse.jdt.apt.core.aptBuild

The -data parameter specifies the location of your workspace.

The version number for the equinox launcher will depend on what version of eclipse you have.

Leave a Comment