ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rolando80 <>
Subject Re: searching help for: class org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter can not be found
Date Tue, 23 Oct 2007 14:12:15 GMT

I've tried the possibilities proposed by you but it didn't work.

Could it be that its because the class DefaultCompilerAdapter is within
ant.jar and aspectjtools.jar?

But i can't leave aspectjtools.jar because it contains the class Ajc which
is required.

Can anyone help?

Dominique Devienne-2 wrote:
> On 10/11/07, Roland Piazzi <> wrote:
>> I try to run the aspectj-compiler with ant but it gives me the following
>> error:
>> A class needed by class can
>> not
>> be found:
>> org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter
>> This class is contained within the file ant.jar which also is in a
>> lib-folder which is added to the path.
>> I don't know how to go on, hope that someone can help me about this?
>> I attach my build file...
>> build.xml
> Sounds like a classloader issue (just a guess). You don't specify a
> classpath when you taskdef Ajc, which implies that it's on the Java
> classpath, while Ant's classes are loaded from a classloader "higher"
> level classloader.
> <taskdef name="ajc"
> classname="">
>      </taskdef>
> I thought Ant set the context class loader to its classloader, so Ajc
> should be able to see the Ant classes... Are you sure you are not
> mixing up several versions of Ant on the classpath?
> Try running Ant with the switch to disables the use of a global
> CLASSPATH, and explicitly tell Ant where the jar for Ajc is, either:
> (1) in the taskdef, (2) via -lib on the command line, or (3) by
> putting the jar in $ANT_HOME/lib. If none of these methods work,
> that's a more difficult issue likely related to a bad classpath (or
> issues in Ajc). --DD
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

View this message in context:
Sent from the Ant - Users mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message