-
1. Re: where to set the JAVA_OPTS for Max memory allocated
jaikiran Nov 12, 2008 5:09 AM (in response to gan.gary)The run.bat is the right place to do this.
-
2. Re: where to set the JAVA_OPTS for Max memory allocated
gan.gary Nov 12, 2008 8:28 AM (in response to gan.gary)Thanks. why ? Any difference?
-
3. Re: where to set the JAVA_OPTS for Max memory allocated
erasmomarciano Nov 12, 2008 8:33 AM (in response to gan.gary)I advice you to create a new file of start.
@echo on rem ------------------------------------------------------------------------- rem JBoss Start CC rem ------------------------------------------------------------------------- set JAVA_HOME="C:\Progra~1\Java\jdk1.5.0_15" cd C:\jboss-4.0.5.GA\bin C:\jboss-4.0.5.GA\bin\run.bat -c default
-
4. Re: where to set the JAVA_OPTS for Max memory allocated
jaikiran Nov 12, 2008 8:41 AM (in response to gan.gary)"gan.gary" wrote:
Thanks. why ? Any difference?
Those parameters are passed to the JVM. The run.bat (or the run.sh) is responsible for instantiating the JVM. These scripts do not look into the environment variables for JVM options. So you either have to change those scripts yourself to pick the values from environment variables or just (the easier and better way) is to set it directly in the run.bat.
The other reason why i don't set such parameters as environment variables is, these parameters are per JVM and need not be per user or per system. So it makes sense to have them set in the script which instantiates the JVM. Infact, i don't even set the JAVA_HOME as an environment variable, given that i have more than one java installation on my system.
-
5. Re: where to set the JAVA_OPTS for Max memory allocated
erasmomarciano Nov 12, 2008 9:54 AM (in response to gan.gary)It is not rigth to modify the file run.bat
If you have to set JAVA_HOME, it is better to edit run.conf.
NOTE:
It seems it does not work in WINDOWS :(
So i advice you to create a new file of start.@echo on rem ------------------------------------------------------------------------- rem JBoss Start CC rem ------------------------------------------------------------------------- set JAVA_HOME="C:\Progra~1\Java\jdk1.5.0_15" cd C:\jboss-4.0.5.GA\bin C:\jboss-4.0.5.GA\bin\run.bat -c default
-
6. Re: where to set the JAVA_OPTS for Max memory allocated
peterj Nov 12, 2008 11:04 AM (in response to gan.gary)erasmarciano, the run.conf file is not used on Windows, so editing it does no good. In addition, gan.gary wanted to know how to set JVM heap options - your example script file does not do this and thus does not solve gan.gary's problem.
-
7. Re: where to set the JAVA_OPTS for Max memory allocated
gan.gary Nov 12, 2008 8:54 PM (in response to gan.gary)Thanks erasmomarciano, jaikiran, PeterJ. I think i gotta modify the "run.bat" anyway, because I need to run the JBoss as windows service, "service.bat" which in turn will call "run.bat" thru':
:cmdStart REM Executed on service start del .r.lock 2>&1 | findstr /C:"being used" > nul if not errorlevel 1 ( echo Could not continue. Locking file already in use. goto cmdEnd ) echo Y > .r.lock jbosssvc.exe -p 1 "Starting %SVCDISP%" > run.log call run.bat < .r.lock -b 0.0.0.0 >> run.log 2>&1 jbosssvc.exe -p 1 "Shutdown %SVCDISP% service" >> run.log del .r.lock goto cmd End
Hi erasmomarciano
It is not rigth to modify the file run.bat
Just curious what make you think we cannot modify it? ANy idea? -
8. Re: where to set the JAVA_OPTS for Max memory allocated
gan.gary Nov 14, 2008 11:10 PM (in response to gan.gary)anyone?
-
9. Re: where to set the JAVA_OPTS for Max memory allocated
jaikiran Nov 15, 2008 1:25 AM (in response to gan.gary)"gan.gary" wrote:
anyone?
Is there any unanswered question here? -
10. Re: where to set the JAVA_OPTS for Max memory allocated
gan.gary Nov 15, 2008 10:42 AM (in response to gan.gary)Hi jaikiran, thanks. I want more input from more people. :)
Because I found most of the threads I posted are either answered by you or PeterJ. I have a feel of thinking that this forum is only 3 of us :( -
11. Re: where to set the JAVA_OPTS for Max memory allocated
peterj Nov 17, 2008 11:18 AM (in response to gan.gary)I won't speak for jaikiran, but as for me, I have no life, which is why I am always in the forums. ;-)
-
12. Re: where to set the JAVA_OPTS for Max memory allocated
gan.gary Nov 18, 2008 12:16 AM (in response to gan.gary)I assume JBoss has a small user-base?
-
13. Re: where to set the JAVA_OPTS for Max memory allocated
noelo Nov 18, 2008 12:34 AM (in response to gan.gary)You assume wrong.....This is just a section of the forums.
-
14. Re: where to set the JAVA_OPTS for Max memory allocated
gan.gary Nov 18, 2008 8:05 AM (in response to gan.gary)but I think this section( almost one third) has the most posts?