Since Ive always relied on IDEs Ive not usedAnt, but have however compiled in the cmd tool. Whats the advantage of Ant - do I need to set classpath for the java compiler as well as for Ant? Need some clarification. Many thanks
No doubt it is covered by the linked article, but there are several advantages of using Ant to build your project instead of a "cmd tool:. (I assume by command tool, you mean an IDE, like JBuilder.) Ant is free. As long users as have Ant they will be able to build your project. With an IDE, you need a copy on each machine (and possibly even the right version) and have set up your project file exactly the same way to repeat the build on another machine. Ant is cross platform. So are some IDEs to some extent. However, even though I've done JBuilder development, I've never, for example, tried to import a whole project begun on Windows onto the Linux version. I'm guessing some tweaks would be needed, but that may not be true. Ant does more. Some of the IDEs have amazing build tools. Besides compiling code, they can compile JSPs, create jars, generate EJB interfaces and descriptors, and even execute an app server. However, they don't come close to all the things Ant can do. In the project I'm working on now, I use Ant to create jars, wars, and ears, run JUnit tests, deploy files locally, or remotely via FTP, generate Castor classes, generate EJB interfaces (via XDoclet), run the obfuscator, etc. If I ever got really stuck (and ambitious), I could write my own Ant task to do whatever I want. OK, I got carried away. That's probably longer than the article. :roll: Obviously I'm a big fan of Ant. I recommend you give it a try!