geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevan Miller <kevan.mil...@gmail.com>
Subject Re: VM Arguments without Eclipse
Date Thu, 20 Aug 2009 11:45:12 GMT

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

> Hi,
>
> 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=...
>
> ...in the setjavaenv.bat file, but Geronimo seems to ignore that.


Depends on how you're starting Geronimo.

1) startserver.sh or geronimo.sh run/etc

    a) JAVA_OPTS environment variable:

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

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

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

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"

--kevan

Mime
View raw message