Hi Ram,
You really need to get into ant a bit more. No paragraph of text here on The Ranch is going to save you that initial effort. Go read up on it at
http://ant.apache.org/manual/index.html. The learnign curve is pretty shallow. I personally find ant very logical and straight forward. So, don't fret!
Just copy/past-ing a build file into your project root is more than likely not going to work. A build file is part of your project, a source file. Many, if not most of us check the build.xml file into source control along with the our Java files.
The 'noClassDefError' sounds like a classic classpath problem. That means javac cannot find a class referenced in the source java. These referenced class can be either in your project or external jars. This is something that can be solved with a properly configured ant file.
ant needs to configured to reflect the locations of your source java files, destination class files, and external jar file dependances. Everyone seems to have their own idea on what a good folder organization is...there is no one standard. So, when you post questions on this it might help to detail your project directory structure more verbosely. Writing all that in a paragraph of text will likely result in fewer help suggestions. Having something mildy standard would help too. E.g.:
Once your project is complied, then you 'deploy' it to
tomcat (or whatever you are using.) This is really a whole other topic. You can just copy over the class files...but you need to have the
servlet engine stuff sorted out too.
I would highly suggest following "hello world" tourturials on both using ant and deploying projects to your web container before trying going farther.
Stu
PS: For the record, I agree with Tim. An IDE should not take control of your project. ant is a great LCD.
[ November 05, 2006: Message edited by: Stu Thompson ]
[ November 05, 2006: Message edited by: Stu Thompson ]