How to use Ant on Mac OS X?
1 - Install the Java Virtual Machine
- Download and install the latest Java Platform (JDK) for your platform
2 - Install Ant
- Ant should be installed by default on Mac OS
3 - Run your ant application
- Open a terminal
cd <my_application_rep>
ant usage
How to use Ant on Windows?
1 - Install the Java Virtual Machine
- Download and install the latest Java Platform (JDK) for your platform
Note: How can I tell if my computer is running a 32-bit (x86) or a 64-bit (x64) version of Windows?
- The only
Development Tools
package is necessary to install. - Take note of the directory where jdk is installed, or choose your own. This location is necessary to know for the next steps.
2 - Install Ant
- Download and install Windows installer for Apache Ant
Note: The java Directory should be set to the same location as in Step 1 (typically C:\Program Files\Java\jdk1.7.x_xx
)
3 - Run your ant application
Start > Run > cmd
to open a terminal
- Make sure that all variables are correclty set
- The command
set
will list all set variables
- The command
- check that
ANT_HOME
is in the list and set to the correct location (it should be the WinAnt main directory, as in Step 2)- If
ANT_HOME
is not set, type:set ANT_HOME=C:\Program Files\WinAnt
- If
- check that
PATH
has been updated (WinAnt\bin should appear)- Try the command:
ant
- If you get
"ant is not recognized as a command"
error message, then, type:set PATH=%PATH%;C:\Program Files\WinAnt\bin
(WinAnt bin directory)
- Try the command:
- check that
JAVA_HOME
points to the correct location (it should be as in Step 1, typicallyC:\Program Files\Java\jdk1.7.x_xx
)- if not, type
set JAVA_HOME=C:\Program Files\Java\jdk1.7.x_xx
(with the proper location, as in Step 1)
- if not, type
- check that
- Run the application
cd <my_application_rep>
(there must be abuild.xml
file in this directory)ant usage