Thanks Kevan for the info.  I've update the G22 doc to reflect these options.

Anything incorrect, please let me know.

Jeff C

On Thu, Aug 20, 2009 at 7:45 PM, Kevan Miller <> wrote:

On Aug 19, 2009, at 1:48 AM, Florian Schaetz wrote:


I just searched for a while but I didn't find anything: How do I set VM arguments for geronimo without using Eclipse (on a windows machine)? In Eclipse it's easy and well documented, but where do I set them in the config files?

I tried adding...

set JAVA_OPTS=... the setjavaenv.bat file, but Geronimo seems to ignore that.

Depends on how you're starting Geronimo.

1) or run/etc

  a) JAVA_OPTS environment variable:

       JAVA_OPTS="-Xmx256m -XX:MaxPermSize=128m -XX:+HeapDumpOnOutOfMemoryError" ./bin/ run

  b) and/or create bin/ (or .bat) file. Contents (for .sh) could look like:

       if [ -z "$JAVA_OPTS" ]; then
          JAVA_OPTS="-Xmx256m -XX:MaxPermSize=128m -XX:+HeapDumpOnOutOfMemoryError"

2) start-server or gsh geronimo/start-server

   a) edit etc/rc.d/start-server,default.groovy:

       // Append some reasonable java flags if none were configured already
       if (command.javaFlags.empty) {
           command.javaFlags << '-Xmx256m'
           command.javaFlags << '-XX:MaxPermSize=128m'
           command.javaFlags << '-XX:+HeapDumpOnOutOfMemoryError'

   b) or use -J flag:

       ./bin/gsh geronimo/start-server  -J -Xmx256m -J -XX:MaxPermSize=128m -J -XX:+HeapDumpOnOutOfMemoryError"