Skip to content

Commit

Permalink
bz-67417 Undo (leftover) security manager system property changes in …
Browse files Browse the repository at this point in the history
…ant.bat
  • Loading branch information
jaikiran committed Sep 16, 2023
1 parent 53e9042 commit 958295a
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions src/script/ant.bat
Original file line number Diff line number Diff line change
Expand Up @@ -117,26 +117,11 @@ set _JAVACMD=%JAVACMD%
if "%JAVA_HOME%" == "" goto noJavaHome
if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
if "%_JAVACMD%" == "" set _JAVACMD=%JAVA_HOME%\bin\java.exe
goto setSecurityManagerOpt
goto checkJikes

:noJavaHome
if "%_JAVACMD%" == "" set _JAVACMD=java.exe

:setSecurityManagerOpt
setlocal EnableDelayedExpansion
"!_JAVACMD!" -XshowSettings:properties 2>&1 | find "java.specification.version = 18" >nul 2>&1
if !errorlevel! EQU 0 (
rem This is Java 18, so set -Djava.security.manager=allow
set JAVA_SECMGR_OPT=-Djava.security.manager=allow
) else (
"!_JAVACMD!" -XshowSettings:properties 2>&1 | find "java.specification.version = 19" >nul 2>&1
if !errorlevel! EQU 0 (
rem This is Java 19, so set -Djava.security.manager=allow
set JAVA_SECMGR_OPT=-Djava.security.manager=allow
)
)
endlocal & set "ANT_OPTS=%ANT_OPTS% %JAVA_SECMGR_OPT%"

:checkJikes
if not "%JIKESPATH%"=="" goto runAntWithJikes

Expand Down

0 comments on commit 958295a

Please sign in to comment.