Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Tools / January 2004

Tip: Looking for answers? Try searching our database.

Ant RMIC. How increase memory allocated for the Java stack?

Thread view: 
Stephen Chalkley - 15 Dec 2003 12:11 GMT
Hi,

I am using Ant 1.5.4 and am getting the following message on my 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 stac
k.

I am trying to follow the advice in this error message from Ant, but
cant get the syntax right!

I have added a compilerarg statement to the build.xml step as below
<target name="rmic" depends="init,compile.rmic">
 <rmic base="${classes.xcob}" stubversion="1.2" debug="on"
sourcebase="${build}/rmic-source">
  <compilerarg value="-J-oss 5m"/>

When I run it with this get ant saying
    [rmic] -J-oss 5m is an invalid option or argument.
and it says
    [rmic]   -J<runtime flag>       Pass argument to the java
interpreter

I have tried many variations of the compilerarg line above.

I have looked at
http://ant.apache.org/manual/CoreTasks/rmic.html
and at
http://www.biostat.wisc.edu/cgi-bcg/man.cgi?section=1&topic=java

but still cant get the syntax right to increase the memory allocated
for the Java stack.

Note I am using Java 1.4.2 here.

Help!

Thanks
Stephen Chalkley.
Stefan Bodewig - 16 Dec 2003 08:09 GMT
> I am trying to follow the advice in this error message from Ant, but
> cant get the syntax right!

Actually from rmic, not Ant 8-)

>    <compilerarg value="-J-oss 5m"/>

There must not be any space between oss and 5.  Use -J-oss5m instead.
But I'd think that 5 MB is not enough if the default value is too low.

Stefan
Stephen Chalkley - 16 Dec 2003 17:57 GMT
> > I am trying to follow the advice in this error message from Ant, but
> > cant get the syntax right!
[quoted text clipped - 7 lines]
>
> Stefan

Thanks, but I tried this and get the same message, i.e.
<compilerarg value="-J-oss5m"/>
gives message
[rmic] -J-oss5m is an invalid option or argument.

Stephen.
Stephen Chalkley - 08 Jan 2004 17:19 GMT
Gave up on trying to get Ant to give more space to the compiler.

Solved using the Ant exec task.
I got rmic to run in a batch file, then copying the arguments to the
exec task in the build file as follows. (path and class names changed)

   <target name="rmic.exec" description="rmic of the class that fails
in the ant rmic task">
           <exec executable="rmic.exe">
                <arg line="-v1.2"/>
                <arg line="-classpath"/>
                <arg
line=".;C:\dev\views\aaa\src\java\;C:\dev\bbb\build\webapp\WEB-INF\lib\log4j-1.2.2.jar;C:\dev\bbb\build\webapp\WEB-INF\lib\activation.jar;C:\dev\bbb\build\webapp\WEB-INF\lib\EnterpriseJMS50.jar;C:\dev\bbb\build\webapp\WEB-INF\lib\jms.jar;C:\dev\bbb\build\webapp\WEB-INF\lib\mail.jar;C:\dev\bbb\build\webapp\WEB-INF\lib\sybase.jar;C:\dev\bbb\build\webapp\WEB-INF\lib\ccc.jar"/>
                <arg line="-d"/>
                <arg line="C:\dev\aaa\build\classes.qqq"/>
                <arg
line="com.ddd.component.objectserver.rmi.eee.myClasee"/>
           </exec>
   </target>

Stephen Chalkley


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.