ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guru Balse <guru.ba...@oracle.com>
Subject Re: ANT Task classpath?
Date Fri, 03 Sep 2004 17:00:01 GMT

> u are answering your own question ! your classpath only knows about Test.jar...nothing
else....I assume Test class is not in
> your jar...u need to add path ...u could do this by adding class as below to your fileset

I had neglected to mention 2 things:

1. Test.jar only has 1 class in it - Test.class, and

2. My system claspath has "." in it which is why TestCP.class is picked up

As it turns out, #2 was the key missing point!

When I did both of the following:

 * Reorganized Test.jar to contain:

	TestCP.class
	test/Test.class

 * Ran the test from a different directory to prevent TestCP.class from being loaded from
"."

then everything works fine.

My guess is that the <classpath> is used ONLY if taskdef is unable to locate the class
from the system class path.  In other words, since TestCP was unresolved from the system class
path, Test.jar was loaded.

Thanks, Jim.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message