[prev in list] [next in list] [prev in thread] [next in thread] 

List:       geronimo-user
Subject:    Re: VM Arguments without Eclipse
From:       chi runhua <chirunhua () gmail ! com>
Date:       2009-08-21 15:57:19
Message-ID: 98a659de0908210857j27c18327r6001c12d8f664e3e () mail ! gmail ! com
[Download RAW message or body]

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
>

[Attachment #3 (text/html)]

Thanks Kevan for the info.  I&#39;ve update the G22 doc to reflect these \
options.<br><br><a href="http://cwiki.apache.org/confluence/display/GMOxDOC22/Runtime+ \
issues">http://cwiki.apache.org/confluence/display/GMOxDOC22/Runtime+issues</a><br> \
<br>Anything incorrect, please let me know.<br><br>Jeff C<br><br><div \
class="gmail_quote">On Thu, Aug 20, 2009 at 7:45 PM, Kevan Miller <span \
dir="ltr">&lt;<a href="mailto:kevan.miller@gmail.com">kevan.miller@gmail.com</a>&gt;</span> \
wrote:<br> <blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, \
204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div \
class="h5"><br> On Aug 19, 2009, at 1:48 AM, Florian Schaetz wrote:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); \
margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> Hi,<br>
<br>
I just searched for a while but I didn&#39;t find anything: How do I set VM arguments \
for geronimo without using Eclipse (on a windows machine)? In Eclipse it&#39;s easy \
and well documented, but where do I set them in the config files?<br>

<br>
I tried adding...<br>
<br>
set JAVA_OPTS=...<br>
<br>
...in the setjavaenv.bat file, but Geronimo seems to ignore that.<br>
</blockquote>
<br>
<br></div></div>
Depends on how you&#39;re starting Geronimo.<br>
<br>
1) startserver.sh or geronimo.sh run/etc<br>
<br>
   a) JAVA_OPTS environment variable:<br>
<br>
        JAVA_OPTS=&quot;-Xmx256m -XX:MaxPermSize=128m \
-XX:+HeapDumpOnOutOfMemoryError&quot; ./bin/geronimo.sh run<br> <br>
   b) and/or create bin/setenv.sh (or .bat) file. Contents (for .sh) could look \
like:<br> <br>
        if [ -z &quot;$JAVA_OPTS&quot; ]; then<br>
           JAVA_OPTS=&quot;-Xmx256m -XX:MaxPermSize=128m \
-XX:+HeapDumpOnOutOfMemoryError&quot;<br>  fi<br>
<br>
2) start-server or gsh geronimo/start-server<br>
<br>
    a) edit etc/rc.d/start-server,default.groovy:<br>
<br>
        // Append some reasonable java flags if none were configured already<br>
        if (command.javaFlags.empty) {<br>
            command.javaFlags &lt;&lt; &#39;-Xmx256m&#39;<br>
            command.javaFlags &lt;&lt; &#39;-XX:MaxPermSize=128m&#39;<br>
            command.javaFlags &lt;&lt; &#39;-XX:+HeapDumpOnOutOfMemoryError&#39;<br>
        }<br>
<br>
    b) or use -J flag:<br>
<br>
        ./bin/gsh geronimo/start-server  -J -Xmx256m -J -XX:MaxPermSize=128m -J \
-XX:+HeapDumpOnOutOfMemoryError&quot;<br><font color="#888888"> <br>
--kevan<br>
</font></blockquote></div><br>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic