javanetbeansantcommand-line

Clean and build Netbeans java project from command line


I have a java application project (ant) under Netbeans and I want to programmatically call the action similar to Netbeans' clean and build (clean the project and than build it) command using something like javac or ant. How am I supposed to do that? I've already look at this but it didn't help me.


Solution

  • Netbeans for clean and build is using Ant (If it is not a maven project). Make some research of it (try with Writing a Simple Buildfile) and you will be able to do the same with your project by writing Ant build script for it.