How to execute custom ant task in Mac OS x? The exact problem i am facing is that i have developed a custom ant task and calling that task in my ant script. This is the error that is displayed: $ ant -buildfile test.xml Buildfile: test.xml BUILD FAILED /Users/sujithkrishnan/Desktop/test.xml:11: taskdef A class needed by class com.digby.api.ProjectBuilder cannot be found: org/apache/tools/ant/Task Total time: 0 seconds ProjectBuilder is my class where i am using the ant's class which is org.apache.tools.ant.Task. My CLASSPATH is also correctly set as shown below: sujith-krishnans-mac-miniesktop sujithkrishnan$ echo $CLASSPATH /usr/share/ant/lib/ant.jar This class was developed in windows machine with ant 1.6.4 and java 1.5.0_08 The mac os is having java 1.5.0 and ant 1.7.0. Any solutions will be highly appreciated.