did you try to set fork="true" and memoryMaximumSize="512m" or even 1024m ?
I also work with many dirs and sources, and here it works fine:
this is my javac task:
<target name="compile" depends="init">
<javac srcdir="${sources}"
destdir="${build}"
classpathref="cmp.jars"
fork="true"
memoryMaximumSize="512m"
nowarn="true"
failonerror="false"
excludes="**\AllocationObserverBCImpl.java"
/>
</target>
and when you split it, and want to compile every subdirectory, I think you have to add
every subdirectory to the classpath, not only the Src Directory. Therefor it would be
nice to know how wildcards can be used in the <path> task, but I haven't found out
yet. Someone else?
-----Urspr�ngliche Nachricht-----
Von: Lule Chen [mailto:[EMAIL PROTECTED]
Gesendet: Donnerstag, 10. Juli 2003 17:35
An: Ant Users List
Betreff: Foreach and javac
Hi, I have a directory contains hundreds of subdirectories and more than
5000 files. If I use the javac task on this directory, it always fails with
the error out of resources. Therefore I am trying to use the foreach task on
each subdirectories, but the javac always complains about package not found
error.
Suppose I have the following directory structures
Src/
sub1/
type1.java
type2.java
sub2/
class1.java
class2.java
...
When the foreach task iterates on each subdirectory, for instance the sub2
directory, if the file class1.java references the type sub1.type1, the javac
always complains the package sub1 not found. I include the Src into the
classpath, but it does not help. Could you please let me know what is the
right way to do it?
Louis
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]