Xiangzhou Wang wrote:
> Hi,
>
> I know it is not a new problem.
>
> I am using ant 1.6.5 to compile large number of java
> files pre-generated from jsp pages with tomcat 5.5.15
> jspC. The total number of bytes of these java files is
> around 150 MB, total class is 40MB, total lib (exclude
> java) is 21MB.
>
> I am using ant only, NO IDE tools. the javac config
> is:
>     <javac destdir="${build.home}/WEB-INF/classes"
>            optimize="off"
>            debug="on" failonerror="false"
>            srcdir="${build.home}/WEB-INF/src"
>            memoryInitialSize="512m"
>            memoryMaximumSize="512m"
>            source="1.5"
>            target="1.5"
>            fork="true" verbose="5" listfiles="true">
>         ....for classpath
>     </javac>
>
> I always get failure because of "system out of
> resource".
>
>     [javac] The system is out of resources.
>     [javac] Consult the following stack trace for
> details.
>     [javac] java.lang.OutOfMemoryError: Java heap
> space
>     [javac] Compile failed; see the compiler error
> output for details.
>
>
> The ant process eats up large chunk of memory (>500MB,
> total memory is 1GB). I also used javac -XX:paralelGC
> to launch ant, still the same error. I set fork for
> true and false, both have same error too.
>
> It is claimed the memory leak is fixed, is there
> anyone with similar problem? How to solve it?

Looks to me like you have run out of space in javac. As you are forking javac, this is not an ant bug. I repeat: this is not an ant bug.

Why not ask for more memory for javac.


> It seems to me that ant caches a lot of things in the
> memory, is there a way to hack ant to force disk
> writing.

This is not an ant problem. This is javac, which is probably just very memory hungry on account of the large number of pages to compile. Please dont blame us.


-steve

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to