You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by St...@ubs.com on 2003/12/30 16:46:27 UTC

Ant rmic. How 'increase the memory allocated for the Java stack.' ?

Hi,

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"/>		
        </rmic>
    </target> 

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"/>
and
<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 step
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 http://www.ubs.com

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: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: Ant rmic. How 'increase the memory allocated for the Java stack.' ?

Posted by Stefan Bodewig <bo...@apache.org>.
On Tue, 30 Dec 2003, Stephen Chalkley <St...@ubs.com>
wrote:

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

Sounds right to me.  Maybe Ant is putting the flag into a bad place on
the command line - what does the command line look like when you run
ant with -verbose?

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org