Build Eclipse Java Projects from the Command Line
The ability to compile Eclipse-based Java projects from the command line can streamline automated builds and eliminate the need to rely on external tools like Ant. Here's how to accomplish this task:
Using the Equinox Launcher (Eclipse Mars and Later)
java -jar plugins/org.eclipse.equinox.launcher_*.jar -noSplash -data "workspace" -application org.eclipse.jdt.apt.core.aptBuild
Replace the version number (*) with the actual version of the Equinox launcher installed with your Eclipse version.
Using startup.jar (Eclipse Pre-Mars)
java -cp startup.jar -noSplash -data "workspace" -application org.eclipse.jdt.apt.core.aptBuild
Tips:
Additional Resources:
The above is the detailed content of How to Compile Eclipse-based Java Projects from the Command Line?. For more information, please follow other related articles on the PHP Chinese website!