This week's book giveaways are in the Scala and Android forums.
We're giving away four copies each of Machine Learning Systems: Designs that scale and Xamarin in Action: Creating native cross-platform mobile apps and have the authors on-line!
See this thread and this one for details.
Win a copy of Machine Learning Systems: Designs that scale this week in the Scala forum
or Xamarin in Action: Creating native cross-platform mobile apps in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

compiling with ANT  RSS feed

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
mister krabs
Ranch Hand
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We had an article about installing and using ANT in the JavaRanch newsletter:
http://www.javaranch.com/newsletter/Mar2002/newslettermar2002.jsp#ant
 
Sheriff
Posts: 9087
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I wonder if you'd get more info if you posted this question in the ANT forum.
 
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving this to The Ant Forum...
 
Sheriff
Posts: 3015
12
Firefox Browser IntelliJ IDE Java Mac Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
It's a pleasure to see superheros taking such an interest in science. And this tiny ad:
Rocket Oven Kickstarter - from the trailboss
https://coderanch.com/t/695773/Rocket-Oven-Kickstarter-trailboss
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!