From efb4c26db45717bc4bceced2066bf5299c442574 Mon Sep 17 00:00:00 2001 From: Jan Materne Date: Sat, 6 Sep 2003 15:48:01 +0000 Subject: [PATCH] A little example for spawn attribute. git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@275196 13f79535-47bb-0310-9956-ffa450edef68 --- docs/manual/CoreTasks/exec.html | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/manual/CoreTasks/exec.html b/docs/manual/CoreTasks/exec.html index 014ac301c..e330fedf2 100644 --- a/docs/manual/CoreTasks/exec.html +++ b/docs/manual/CoreTasks/exec.html @@ -253,6 +253,7 @@ but some configuration problem on your machine. </exec>

starts emacs on display 1 of the X Window System.

+
 <exec ... >
   <env key="PATH" path="${java.library.path}:${basedir}/bin"/>
@@ -260,6 +261,19 @@ but some configuration problem on your machine.
 

adds ${basedir}/bin to the PATH of the system command.

+ +
+<property name="browser" location="C:/Programme/Internet Explorer/iexplore.exe"/>
+<property name="file" location="ant/docs/manual/index.html"/>
+
+<exec executable="${browser}" spawn="true">
+    <arg value="${file}"/>
+</exec>
+
+

Starts the ${browser} with the specified ${file} and end the +ant process. The browser will let be open.

+ +

Note: Although it may work for you to specify arguments using a simple arg-element and separate them by spaces it may fail if you switch to a newer version of the JDK. JDK < 1.2 will pass these as separate arguments