ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <>
Subject Re: Javac task running out of memory
Date Sat, 16 Sep 2000 00:54:45 GMT
At 06:43  15/9/00 -0500, you wrote:
>We have a fairly large Java source tree (500+ *.java files in a dozen
>packages/subpackages) which we would like to use Ant to build.
>Our first try of the obvious solution:
><project name="foo" default="compile">
>  <target name="compile">
>    <javac srcdir="./src" destdir="./classes" />
>  </target>
>caused Ant to report "compiling 539 java files", and then after a minute
>of two, the build fails with an OutOfMemoryError.  We think javac simply
>has too many files to compile.
>Has this problem come up before?  Is there a good solution to this
>problem (other than the obvious hacks: split the project into two,
>increase the maximum memory size for javac)?

well I use jikes to compile projects with about 1400 files - so that would
definetly be an option :P. Otherwise you are left with splitting up the
build :( or perhaps you could make java task launch a new process and pass
flags to alow the JVM to use more memory



| "Nearly all men can stand adversity, but if you want |
| to test a man's character, give him power."          |
|       -Abraham Lincoln                               |

View raw message