0

I have ported some litle Java application to Groovy. The Java application needs to be started with the VM switches -server -Xss15500k to prevent a stackoverflow from happening. The question is how to pass these vm args on to groovy. I tried this here:

SET PATH=%PATH%;%GROOVY_HOME%\bin
groovy -server -Xss15500k MyApp.groovy

and this here:

SET PATH=%PATH%;%GROOVY_HOME%\bin
SET JAVA_OPTS=-server -Xss15500k
groovy MyApp.groovy

It both doesn't work and I get an OutOfmemoryError unlike the Java counterpart. Any hints how to get this done appreciated :-).

Thanks, Oliver

OlliP
  • 1,545
  • 11
  • 22

1 Answers1

2

If you're getting an OutOfMemoryError then you probably want to increase the memory as well as the stack

SET JAVA_OPTS=-server -Xss15500k -Xmx1G
tim_yates
  • 167,322
  • 27
  • 342
  • 338
  • This did it. -Xm1G wasn't necessary for the Java version and I kept thinking that groovy simply doesn't pick up the vm args at all. Thanks a lot! – OlliP Mar 05 '13 at 14:57