[jboss-jira] [JBoss JIRA] (AS7-4387) CLONE - standalone.bat doesn't modify JAVA_OPTS correctly

Jason Greene (JIRA) jira-events at lists.jboss.org
Thu Apr 5 14:30:48 EDT 2012


    [ https://issues.jboss.org/browse/AS7-4387?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12682213#comment-12682213 ] 

Jason Greene commented on AS7-4387:
-----------------------------------

Hmm these should be functionally equivalent
                
> CLONE - standalone.bat doesn't modify JAVA_OPTS correctly
> ---------------------------------------------------------
>
>                 Key: AS7-4387
>                 URL: https://issues.jboss.org/browse/AS7-4387
>             Project: Application Server 7
>          Issue Type: Bug
>          Components: Scripts
>    Affects Versions: 7.1.1.Final
>            Reporter: Rostislav Svoboda
>            Assignee: Brian Stansberry
>            Priority: Critical
>             Fix For: 7.1.2.Final-redhat1
>
>
> standalone.bat doesn't modify JAVA_OPTS correctly because Only last change of JAVA_OPTS is reflected. JAVA_OPTS isn't dynamically changed withing 'if' part.
> {code}
> if not "%PRESERVE_JAVA_OPTS%" == "true" (
>   rem Add -client to the JVM options, if supported (32 bit VM), and not overriden
>   echo "%JAVA_OPTS%" | findstr /I \-server > nul
>   if errorlevel == 1 (
>     "%JAVA%" -client -version 2>&1 | findstr /I /C:"Client VM" > nul
>     if not errorlevel == 1 (
>       set "JAVA_OPTS=-client %JAVA_OPTS%"
>     )
>   )
>   rem Add compressed oops, if supported (64 bit VM), and not overriden
>   echo "%JAVA_OPTS%" | findstr /I "\-XX:\-UseCompressedOops \-client" > nul
>   if errorlevel == 1 (
>     "%JAVA%" -XX:+UseCompressedOops -version > nul 2>&1
>     if not errorlevel == 1 (
>       set "JAVA_OPTS=-XX:+UseCompressedOops %JAVA_OPTS%"
>     )
>   )
>   rem Add tiered compilation, if supported (64 bit VM), and not overriden
>   echo "%JAVA_OPTS%" | findstr /I "\-XX:\-TieredCompilation \-client" > nul
>   if errorlevel == 1 (
>     "%JAVA%" -XX:+TieredCompilation -version > nul 2>&1
>     if not errorlevel == 1 (
>       set "JAVA_OPTS=-XX:+TieredCompilation %JAVA_OPTS%"
>     )
>   )
> )
> {code}
> must be changed to
> {code}
> if not "%PRESERVE_JAVA_OPTS%" == "true" (
>   rem Add -client to the JVM options, if supported (32 bit VM), and not overriden
>   echo "%JAVA_OPTS%" | findstr /I \-server > nul
>   if errorlevel == 1 (
>     "%JAVA%" -client -version 2>&1 | findstr /I /C:"Client VM" > nul
>     if not errorlevel == 1 (
>       set "JAVA_OPTS=-client %JAVA_OPTS%"
>     )
>   )
> )
> if not "%PRESERVE_JAVA_OPTS%" == "true" (
>   rem Add compressed oops, if supported (64 bit VM), and not overriden
>   echo "%JAVA_OPTS%" | findstr /I "\-XX:\-UseCompressedOops \-client" > nul
>   if errorlevel == 1 (
>     "%JAVA%" -XX:+UseCompressedOops -version > nul 2>&1
>     if not errorlevel == 1 (
>       set "JAVA_OPTS=-XX:+UseCompressedOops %JAVA_OPTS%"
>     )
>   )
> )
> if not "%PRESERVE_JAVA_OPTS%" == "true" (
>   rem Add tiered compilation, if supported (64 bit VM), and not overriden
>   echo "%JAVA_OPTS%" | findstr /I "\-XX:\-TieredCompilation \-client" > nul
>   if errorlevel == 1 (
>     "%JAVA%" -XX:+TieredCompilation -version > nul 2>&1
>     if not errorlevel == 1 (
>       set "JAVA_OPTS=-XX:+TieredCompilation %JAVA_OPTS%"
>     )
>   )
> )
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list