This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes Ant, Maven and Other Build Tools and the fly likes Setting execution classpath in Ant Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Setting execution classpath in Ant" Watch "Setting execution classpath in Ant" New topic

Setting execution classpath in Ant

Tebogo Modiselle

Joined: Aug 19, 2011
Posts: 1
just a question on ANT, if my project is
/tmp/antexample/build.xml then

my classpath for execution would be
<path id="/tm/antexample/build/classes">
<pathelemennt location="/tmp/antexample/build/classess">

Im trying to get there, I can clean, compile and no error as soon as i run "ant execute" i also get that error. but i downloaded some ant example on the Internet and executed it in comparison to my application but it works and mine doesn't want to.

what am i doing wrong?
Peter Johnson

Joined: May 14, 2008
Posts: 5852

Tebogo, welcome to Java Ranch!

First, the classpath id should be a simple identifier. So you might want to use something like this:

Second, you didn't show us the <java> task declaration, we need to see that to ensure that you reference the classpath correctly. Basically you want to add a classpathref that uses the path's id. In other words:

Third, there are a couple of typos the <path> you posted. I hope those typos are not in your actual build script.

If none of this helps, post the full build.xml file and the full output when you run the build.

P.S. I split your post into a separate topic because it is usually not a good idea to ask new questions on threads that are very old.

JBoss In Action
I agree. Here's the link:
subject: Setting execution classpath in Ant
It's not a secret anymore!