-
Bug
-
Resolution: Done
-
Critical
-
7.1.1.Final
-
None
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.
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%" ) ) )
must be changed to
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%" ) ) )