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 3c03f5424 Update manuals to note that permissions is no longer 
supported in Java 18 and higher and use fork=true wherever appropriate
3c03f5424 is described below

commit 3c03f542411614a07bce7f5cc86ca4da0af39624
Author: Jaikiran Pai <jaiki...@apache.org>
AuthorDate: Wed Aug 16 15:39:27 2023 +0530

    Update manuals to note that permissions is no longer supported in Java 18 
and higher and use fork=true wherever appropriate
---
 manual/Tasks/java.html  | 10 ++++++++--
 manual/Tasks/junit.html |  8 ++++++++
 2 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/manual/Tasks/java.html b/manual/Tasks/java.html
index 31f4f0143..304dce9af 100644
--- a/manual/Tasks/java.html
+++ b/manual/Tasks/java.html
@@ -28,7 +28,9 @@
 <h3>Description</h3>
 <p>Executes a Java class within the running (Apache Ant) JVM or forks another 
JVM if specified.</p>
 <p>If odd things go wrong when you run this task, set 
<var>fork</var>=<q>true</q> to use a new
-JVM.</p>
+JVM. It is necessary to set <var>fork</var>=<q>true</q>, if the class being 
launched by
+  this task or any libraries being used by that class, call APIs like
+  <code>java.lang.System.exit()</code> or 
<code>java.lang.Runtime.exit()</code>.</p>
 
 <p><em>Since Ant 1.6.3</em>, you can interact with a forked JVM, as well as 
sending input to it via
 the <var>input</var> and <var>inputstring</var> attributes.</p>
@@ -280,13 +282,17 @@ about <a href="exec.html#env">exec</a></p>
 
 <p><em>Since Ant 1.6</em>.</p>
 
+<p><strong>Note</strong>:<br/> This element is no longer supported when 
running on Java 18 and
+  higher versions. See <a href="../Types/permissions.html">permissions</a> for 
details</p>
+
 <p>Security permissions can be revoked and granted during the execution of the 
class via a
 nested <code>permissions</code> element. For more information please
 see <a href="../Types/permissions.html">permissions</a>.</p>
 <p>When the permission <code>RuntimePermission exitVM</code> has not been 
granted (or has been
 revoked) the <code>System.exit()</code> call will be intercepted and treated 
like indicated
 in <var>failonerror</var>.</p>
-<p><strong>Note</strong>:<br/> If you do not specify permissions, a set of 
default permissions will
+<p><strong>Note</strong>:<br/> When running on Java runtime versions lesser 
than 18,
+  if you do not specify permissions, a set of default permissions will
 be added to your Java invocation to make sure that the Ant run will continue 
or terminated as
 indicated by <var>failonerror</var>. All permissions not granted per default 
will be checked by
 whatever security manager was already in place. <code>exitVM</code> will be 
disallowed.</p>
diff --git a/manual/Tasks/junit.html b/manual/Tasks/junit.html
index 4abb35a27..5c33fbbba 100644
--- a/manual/Tasks/junit.html
+++ b/manual/Tasks/junit.html
@@ -33,6 +33,11 @@ no <code>JUnit4TestAdapter</code>.</p>
 <p><strong>Note</strong>: This task depends on external libraries not included
 in the Apache Ant distribution.  See <a 
href="../install.html#librarydependencies">
 Library Dependencies</a> for more information.</p>
+
+<p><strong>Note: </strong>It is necessary to set <var>fork</var>=<q>true</q>, 
if the test(s)
+  being launched by this task or any libraries being used by the test(s), call 
APIs like
+<code>java.lang.System.exit()</code> or 
<code>java.lang.Runtime.exit()</code>.</p>
+
 <p><strong>Note</strong>: You must have <samp>junit.jar</samp> available.  You 
can do one of:</p>
 <ol>
   <li>Put both <samp>junit.jar</samp> and <samp>ant-junit.jar</samp>
@@ -294,6 +299,9 @@ is <q>false</q> or the target JVM doesn't support it (i.e. 
Java 1.1).</p>
 
 <p><em>Since Ant 1.6</em>.</p>
 
+<p><strong>Note</strong>:<br/> This element is no longer supported when 
running on Java 18 and
+  higher versions. See <a href="../Types/permissions.html">permissions</a> for 
details</p>
+
 <p>Security permissions can be revoked and granted during the execution of the 
class via a
 nested <code>permissions</code> element. For more information please
 see <a href="../Types/permissions.html">permissions</a></p>

Reply via email to