It's not a secret anymore!
The moose likes Ant, Maven and Other Build Tools and the fly likes Classpath for Ant program Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Classpath for Ant program" Watch "Classpath for Ant program" New topic

Classpath for Ant program

Tore Sagen

Joined: Apr 23, 2004
Posts: 18
I have this basic build.xml:

The classes are packed into catalina-ant5.jar and placed in /usr/share/ant/lib. I thought Ant should load the classes automatically, but it doesn't. Invoking Ant gives me this:

The following command doesn't help either, specifying the classpath in detail:

I could use some help, please.
Ilja Preuss

Joined: Jul 11, 2001
Posts: 14112
Did you take a look at whether the jar file actually contains that class?

The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Tore Sagen

Joined: Apr 23, 2004
Posts: 18
Yes, I have. The result is listed below.

Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17423

Don't confuse the classpath for Ant itself with the classpath for the taskdef. You probably need to add a classpath definition to the task. For some tasks, I've actually had to do 2 classpaths - one for the taskdef itself and one for the defined task's execution.

An IDE is no substitute for an Intelligent Developer.
I agree. Here's the link:
subject: Classpath for Ant program
It's not a secret anymore!