
The only environment variable that you absolutely need is JAVA_HOME, which tells Ant the location of your JRE. Make sure you’re only working on system variables and not user variables. The dialog for both Windows XP and Windows 7 is the same. Click on Advanced System Settings and click the Environment Variables button at the bottom. Then go to the Advanced tab and click the Environment Variables button at the bottom.įor Windows 7: To set environment variables on Windows 7, right click on Computer and select Properties. Because you’re installing Ant by hand, you also need to deal with setting environment variables by hand.įor Windows XP: To set environment variables on Windows XP, right click on My Computer and select Properties. I do recommend, however, that the path have no spaces in it (spaces make things more complicated). I tend to use c:\java\ant for simplicity, but you can use whatever you want. You’ll now need to choose a permanent home for Ant on the computer. Scroll down to where it says “Current release of Ant” and click on the ZIP filename. Because we’re talking about Windows, choose to download the ZIP file rather than any of the others.

Go to the Ant homepage and click to download the binary. The first step, as with most software, is to download Ant. It’s better to install the JDK instead of just the JRE because some Ant tasks require the JDK. If not, go download it from Sun 2 and install it. Prerequisitesīefore beginning, make sure you have the latest JDK installed. So this post is primarily for myself, so that I don’t need to search too far. Every time I have to install Ant on another Windows machine I end up searching the web yet again for a good set of instructions. Unfortunately, it’s a bit of a beast to install on Windows. What’s more, it comes installed on Macs and is an easy install on Linux as a package. Yes, I know there are a lot of shiny new tools written in Node.js or something else, but I’ve used Ant for a long time and have found it easy to teach others. * Otherwise this task's up-to-date tracking mechanisms do not work.Apache Ant 1 is still my favorite tool for creating build systems for my code. ** * Ensure that every package-info.java} produced a package-info.class}.
