ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Ant rmic. How 'increase the memory allocated for the Java stack.' ?
Date Tue, 30 Dec 2003 15:46:27 GMT

I am getting the following message in an ant rmic step.

[rmic] The compiler has run out of stack space.  Consider using the "-J-oss<number>"
 command line option to increase the memory allocated for the Java stack.

So I add a 'compilerarg' line to my rmic step in my build.xml as follows

    <target name="rmic2" depends="init,compile.rmic" >
        <rmic base="${classes.abcd}" stubversion="1.2" debug="on" sourcebase="${build}/rmic-source"
          <compilerarg value="-J-oss50m"/>
	    <include name="com/aaa/bbb/rmi/DAO/BusinessDAOImpl.class"/>		

but when I re-run rmic I get the message 
     [rmic] -J-oss50m is an invalid option or argument.
     [rmic] Usage: rmic <options> <class names>
     [rmic] where <options> includes:
     [rmic]   -J<runtime flag>       Pass argument to the java interpreter

I have tried many variations of the line such as 
<compilerarg value="-Joss50m"/>
<compilerarg value="-J -oss50m"/>
and even 
<compilerarg value="-J-Xmx32m"/>
<compilerarg value="-J-Xms48m"/>

but they all give the same "... is an invalid option or argument." message.

I can put <compilerarg value="-verbose"/>  and I get lots of output during the rmic
which shows the compilerarg syntax is ok.

So, how do I 'increase the memory allocated for the Java stack' ?

I am using jdk 1.4.2_02 and ant 1.6.0.
I have been trying to fix this for hours and hours...

Thanks :)

Stephen Chalkley

Visit our website at

This message contains confidential information and is intended only 
for the individual named.  If you are not the named addressee you 
should not disseminate, distribute or copy this e-mail.  Please 
notify the sender immediately by e-mail if you have received this 
e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free 
as information could be intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain viruses.  The sender therefore 
does not accept liability for any errors or omissions in the contents 
of this message which arise as a result of e-mail transmission.  If 
verification is required please request a hard-copy version.  This 
message is provided for informational purposes and should not be 
construed as a solicitation or offer to buy or sell any securities or 
related financial instruments.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message