The solution is simple - make sure the classpath includes the class in question.
If you need more help than that, please provide some information so that we can help you. Such items would include the console ouptut for the target and/or task being run, and the target and/or task from the build.xml file (or even the whole build.xml file). http://faq.javaranch.com/java/TellTheDetails
(By the way, looks like you posted twice - I deleted the duplicate.)