• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Out of memory on command line build.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Out of memory on command line build.


  • Subject: Re: Out of memory on command line build.
  • From: doug andrews <email@hidden>
  • Date: Fri, 10 Jul 2009 15:38:55 -0400

That did the trick.
Thanks Chuck.


On Jul 10, 2009, at 3:22 PM, Chuck Hill wrote:


On Jul 10, 2009, at 12:16 PM, doug andrews wrote:

I'm moving a large project from Xcode to Eclipse/WOLips.
Within the IDE, i can compile and build fine.
I am having difficulty compiling through the command line though.

Entering:
ant -lib /Developer/Applications/eclipse/plugins/ org.objectstyle.wolips.woproject.ant_3.3.5047/lib/woproject.jar compile


Gives me the following errors:
[wocompile] The system is out of resources.
[wocompile] Consult the following stack trace for details.
[wocompile] java.lang.OutOfMemoryError: Java heap space
[wocompile] at com.sun.tools.javac.parser.Scanner.stringVal (Scanner.java:1165)
etc ....


This project has a lot of source code.

In the xcode days, we also ran into a similar memory error when compiling.
This was solved by adding -J-mx256m to the JAVA_COMPILER_FLAGS setting in the Application target.


Is there a way to increase the memory used by javac within the command line?

How to set java heap size in Apache Ant?
Set environment variable ANT_OPTS. Look at the file $ANT_HOME/bin/ ant or %ANT_HOME%\bin\ant.bat, for how this variable is used by Ant runtime.
set ANT_OPTS="-Xms512m -Xmx512m" (Windows)
export ANT_OPTS="-Xms512m -Xmx512m" (ksh/bash)
setenv ANT_OPTS "-Xms512m -Xmx512m" (tcsh/csh)



Why would it compile within the IDE, but run out of memory in the command line?


Because Eclipse has more memory allocated to it. IIRC there was a bug in some earlier versions that caused Ant to run out of memory in certain cases.


Chuck


-- Chuck Hill Senior Consultant / VP Development

Learn WO at WOWODC'09 East in Montréal this August!
http://www.wocommunity.org/wowodc09/east

http://arstechnica.com/apple/news/2009/07/webobjects-sliced- from-106but-prognosis-of-death-premature.ars


_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Out of memory on command line build. (From: doug andrews <email@hidden>)
 >Re: Out of memory on command line build. (From: Chuck Hill <email@hidden>)

  • Prev by Date: Re: Out of memory on command line build.
  • Next by Date: Re: What is the difference between these webobjects URLs?
  • Previous by thread: Re: Out of memory on command line build.
  • Next by thread: WOWebserviceClient: invalid argument
  • Index(es):
    • Date
    • Thread