This is an automated email from the ASF dual-hosted git repository.
jaikiran pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ant.git
The following commit(s) were added to refs/heads/master by this push:
new 002596a set java.security.manager=allow in Ant launcher .bat file for
Windows, for Java 18
002596a is described below
commit 002596a9bb830257250ea394a2637d57209edb3b
Author: Jaikiran Pai <[email protected]>
AuthorDate: Wed Dec 1 09:01:28 2021 +0530
set java.security.manager=allow in Ant launcher .bat file for Windows, for
Java 18
---
src/script/ant.bat | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/script/ant.bat b/src/script/ant.bat
index 553af25..69041a5 100755
--- a/src/script/ant.bat
+++ b/src/script/ant.bat
@@ -122,6 +122,13 @@ goto checkJikes
:noJavaHome
if "%_JAVACMD%" == "" set _JAVACMD=java.exe
+:setSecurityManagerOpt
+"%_JAVACMD%" -XshowSettings:properties 2>&1 | find "java.specification.version
= 18"
+if "%ErrorLevel%" == "0" (
+ rem This is Java 18, so set -Djava.security.manager=allow
+ set ANT_OPTS="%ANT_OPTS% -Djava.security.manager=allow"
+)
+
:checkJikes
if not "%JIKESPATH%"=="" goto runAntWithJikes