ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Virkus <>
Subject Duplicate Class Error when Re-using Javac Task
Date Fri, 25 Feb 2005 16:13:59 GMT
Hi everyone,

I'd like to re-use a Javac-task from within my own task but I always get 
"duplicate class: ClassName"-errors when I compile the second set of source 
code files.

The background of this is that I have a preprocessor that creates different 
source code versions of the same project, which are then compiled by the task. I use and set different directories 
for the source code and for the compiled classes in each run. The first round 
is compiled without any problems, but the following round fails with the 
"duplicate class" error.

When I create a new instance of the Javac task, it works without problems. 

I want to reuse the Javac task since I want to allow a nested 
<javac>-definition in my task (in the build.xml). (The project is J2ME Polish 
by the way,

Is anyone aware what could be done in this case? I have seen that the Javac 
task resets its internal file list for each execute() call, but this doesn't 
seem to help. I could send a demonstrator project along with the source code 
to anyone interested.

Thanks in advance,
Robert Virkus
Enough Software
Vor dem Steintor 218
28203 Bremen

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

View raw message