geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chi runhua <chirun...@gmail.com>
Subject Re: VM Arguments without Eclipse
Date Fri, 21 Aug 2009 15:57:19 GMT
Thanks Kevan for the info.  I've update the G22 doc to reflect these
options.

http://cwiki.apache.org/confluence/display/GMOxDOC22/Runtime+issues

Anything incorrect, please let me know.

Jeff C

On Thu, Aug 20, 2009 at 7:45 PM, Kevan Miller <kevan.miller@gmail.com>wrote:

>
> 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