You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Dave Barkan <db...@pcbi.upenn.edu> on 2003/02/27 17:43:43 UTC

javac out of memory error

Hi,

I'm running ant 1.5 on Linux.  I'm compiling a large number of java source
files (1200 or so at once) with the <javac> task.  I get this error:

[javac] Compiling 1290 source files to <dir>
    [javac] The system is out of resources.
    [javac] Consult the following stack trace for details.
    [javac] java.lang.OutOfMemoryError

I have a perl executable that calls ant and passes it the necessary
parameters.  Does anyone know how to allocate more memory to ant when
calling it?

If you could cc me on the reply I'd appreciate it as I am a digester.

thanks,
Dave


Re: javac out of memory error

Posted by Mike Castle <da...@ix.netcom.com>.
In article <Pi...@snowball.pcbi.upenn.edu>,
Dave Barkan  <us...@ant.apache.org> wrote:
>Hi,
>
>I'm running ant 1.5 on Linux.  I'm compiling a large number of java source
>files (1200 or so at once) with the <javac> task.  I get this error:
>
>[javac] Compiling 1290 source files to <dir>
>    [javac] The system is out of resources.
>    [javac] Consult the following stack trace for details.
>    [javac] java.lang.OutOfMemoryError

Odd.  Was having just this exact same problem yesterday.

Turned out that, even after upping the memory to ant and successfully
compiling the java file, we couldn't run the class because it was too large
(or more like, a certain piece of data was over 64k).  This was a machine
generated .java file, so not too surprising that happened.

Made me wonder though.  If you're running out of memory building it, does
that mean there's a good chance you won't be able to run it because the
class it too large.

mrc
-- 
     Mike Castle      dalgoda@ix.netcom.com      www.netcom.com/~dalgoda/
    We are all of us living in the shadow of Manhattan.  -- Watchmen
fatal ("You are in a maze of twisty compiler features, all different"); -- gcc

Re: javac out of memory error

Posted by Jesse Stockall <je...@cryptocard.com>.
On Thursday, February 27, 2003, at 11:43 AM, Dave Barkan wrote:

> Hi,
>
> I'm running ant 1.5 on Linux.  I'm compiling a large number of java 
> source
> files (1200 or so at once) with the <javac> task.  I get this error:

export ANT_OPTS=-Xmx256

Jesse Stockall - jesse@cryptocard.com
CRYPTOCard Corp.