This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Ant, Maven and Other Build Tools and the fly likes ant build Exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "ant build Exception" Watch "ant build Exception" New topic
Author

ant build Exception

Shyam Hai
Ranch Hand

Joined: Feb 04, 2009
Posts: 68


When i run the ant build
that time i'm get this error.

"ant build Exception in thread "main" java.lang.NoClassDefFoundError"

How to rectify.
Please..
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5812
    
    7

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.)


JBoss In Action
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: ant build Exception
 
Similar Threads
The hibernatetool ant Task
How to execute ant command from a java program using runtime.exec()?
Eclipse with Ant
Problem in building project using Ant build tool
problems with ant installation