This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Ant, Maven and Other Build Tools and the fly likes Could not find xxxClass Make sure you have it in your classpath Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Could not find xxxClass Make sure you have it in your classpath" Watch "Could not find xxxClass Make sure you have it in your classpath" New topic
Author

Could not find xxxClass Make sure you have it in your classpath

K Mansoor
Ranch Hand

Joined: Jan 10, 2006
Posts: 52
Folks- I'm busting my brains over this for the last few days, have exhausted all avenues, must be missing something simple, but I am apparently not able to set up the <classpath> correctly for .class files.

<dirset dir="${test-output.home}">
<include name="classes/**/*.class" />
</dirset>

I have tried <fileset> and <classfileset> also but to no avail.


Here is my build.xml:



when I run it:
$ ant run -verbose




Help!!! save my sanity.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5812
    
    7

Try changing line 30 to:



You do not want to include class files in the classpath, instead you want to include the base directory that include that class files within a directory path that reflects their packages.


JBoss In Action
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Could not find xxxClass Make sure you have it in your classpath
 
Similar Threads
Spring Testing woes
Juint task in Ant
javadoc problem, using ant build file
Ant build fail, sometimes 'cause ant forgets property
Ant+JUnit