Home > General Development > Ant: Building a Better Build FileAnt: Building a Better Build File Eugenia Loli 2005-05-08 General Development 14 CommentsWant to keep your build file lean, mean, and totally maintainable? Marcus Zarra tells you why Jakarta’s Ant is a relatively easy-to-use way to build your projects (and how to avoid its common pitfalls).About The Author Eugenia LoliEx-programmer, ex-editor in chief at OSNews.com, now a visual artist/filmmaker.Follow me on Twitter @EugeniaLoli 14 Comments 2005-05-08 6:57 pm Right now I have ant installed, but can’t use it. Why? Because it is allergic to my JRE. So why don’t I de install it? Because I need the JRE for Firefox. So either I’ve got no Java in Firefox (which I need) or I have no Ant (which I can live without right now).Hope they fix it. 2005-05-08 7:53 pm Allergic to your JRE?! What’s your JRE version? Never heard of such.. (until it’s 1.1 ofc 2005-05-08 8:11 pm 1.5It looks for tools.jar and dosn’t find it in the JRE of course.I’m not the only one with this problem (found some others with google). 2005-05-08 10:11 pm Try adding it to the classpath explicitly, sometimes this helps. 2005-05-08 11:40 pm Ugh, RTFM, or go study biology. Allergic 😉 Ha! 2005-05-08 11:41 pm Why would you be using ant with the JRE? You should be using it with the JDK.-G 2005-05-09 12:00 am set JAVA_HOME to your jdk. c:jdk1.5.0_02 or watever is your path. I’ve encountered that same problem, its easy to fix. 2005-05-09 1:21 am They are environment variables godammit ! Environmental they are not. 2005-05-09 3:10 am …we use a customized version at work that contains several split out modules to handle our own method of building and deploying. It is really useful to have it check out the latest sources, produce builds for each specialized environment, managing build numbers on the fly, etc.And it builds SO FAST! Way faster than using a tool like JDeveloper.Anyway, cool article. 2005-05-09 7:04 am Then you don’t have to mess with a JVM or wait for it to load. 2005-05-09 8:06 am @gmlongoFirefox uses the JRE, so I have, and need the JRE and the JDK installed.@jmI’ll do that. 2005-05-09 9:36 am Those who don’t know yet Ant should directly use Maven (an other Apache tool) which is a more advanced tool: http://maven.apache.org/With just a project.xml file which describes the project at a high level, it can build a distribution and a whole web site that presents useful information for developers such as code quality and tests execution reports. 2005-05-09 2:03 pm ANT is primarily used as a script for Java builds. It doesn’t make sense for it to run only on top of a JRE (Java Runtime). What it needs is the JDK (Java Development Kit). Otherwise how would it build??? 2005-05-09 2:04 pm When JAVA_HOME is pointed to the JRE installation directory, ANT will most likely not work. It will certainly not build. For installation details, you should consult the ANT homepage. Documentation for ANT is very well written.