Return-Path: Delivered-To: apmail-jakarta-ant-user-archive@jakarta.apache.org Received: (qmail 55767 invoked by uid 500); 6 Jul 2001 12:51:42 -0000 Mailing-List: contact ant-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Reply-To: ant-user@jakarta.apache.org Delivered-To: mailing list ant-user@jakarta.apache.org Received: (qmail 55691 invoked from network); 6 Jul 2001 12:51:38 -0000 Importance: Normal Subject: Re: java compilation out of memory problem To: ant-user@jakarta.apache.org X-Mailer: Lotus Notes Release 5.0.2c February 2, 2000 Message-ID: From: "Myron Uecker" Date: Fri, 6 Jul 2001 06:51:36 -0600 X-MIMETrack: Serialize by Router on D03NM102/03/M/IBM(Release 5.0.7 |March 21, 2001) at 07/06/2001 06:51:37 AM MIME-Version: 1.0 Content-type: text/plain; charset=us-ascii X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N >I run javac task on Ant to compile about 1250 java files. It starts >fine, but after compiling several java programs ( about 20 of them) I >got a run-out-of-memory error. The message also suggests using a >switch -J-mx. I cannot find any document mentioning such a >switch. Has any one encountered such a situation and got a solution to >this problem? The javac command runs under the same JVM as ant itself. If you give ant more memory, it will pass it on to javac. What I found to work is to modify one of the batch files in the bin directory (ant.bat, ant, etc) and add the -mx and -ms options on the call to java ($JAVACMD). For example, this is the last line of my ant shell script where I set the memory size: $JAVACMD -mx65536000 -ms65536000 -classpath "$LOCALCLASSPATH" $ANT_OPTS org.apache.tools.ant.Main "$@" Myron Uecker muecker@att.com