Create a base directory (the project directory) that will hold two other directories. Name the base directory folder "test." Create the first sub directory (within the "test" directory) and name it "src" for source files. Create the second sub directory and name it "build" for the build files.
Create a text file and save it as "build.xml" to hold the contents of the ANT build file. Save it in the base directory "test." Add to your build file the XML tags to define the location of the base directory of your project, the location of your source directory and the necessary Java compilation tags.
Start the Eclipse program. Click the "test" project from the Project menu. Create or place your Java main program and associated files into the "src" directory of the "test" directory.
Right click the "build.xml" file in the "test" directory. Click the "Ant Build" option in the "Run As." Note that any compilation messages you included in the XML file are displayed as ANT compiles the Java classes in the "src" directory.