1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
---|
2 | <!--NewPage-->
|
---|
3 | <HTML>
|
---|
4 | <HEAD>
|
---|
5 | <!-- Generated by javadoc (build 1.4.2_13) on Mon Oct 01 14:33:19 NZST 2007 -->
|
---|
6 | <TITLE>
|
---|
7 | Execute (Apache Ant API)
|
---|
8 | </TITLE>
|
---|
9 |
|
---|
10 | <META NAME="keywords" CONTENT="org.apache.tools.ant.taskdefs.Execute class">
|
---|
11 |
|
---|
12 | <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
|
---|
13 |
|
---|
14 | <SCRIPT type="text/javascript">
|
---|
15 | function windowTitle()
|
---|
16 | {
|
---|
17 | parent.document.title="Execute (Apache Ant API)";
|
---|
18 | }
|
---|
19 | </SCRIPT>
|
---|
20 |
|
---|
21 | </HEAD>
|
---|
22 |
|
---|
23 | <BODY BGCOLOR="white" onload="windowTitle();">
|
---|
24 |
|
---|
25 |
|
---|
26 | <!-- ========= START OF TOP NAVBAR ======= -->
|
---|
27 | <A NAME="navbar_top"><!-- --></A>
|
---|
28 | <A HREF="#skip-navbar_top" title="Skip navigation links"></A>
|
---|
29 | <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
---|
30 | <TR>
|
---|
31 | <TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
---|
32 | <A NAME="navbar_top_firstrow"><!-- --></A>
|
---|
33 | <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
---|
34 | <TR ALIGN="center" VALIGN="top">
|
---|
35 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
---|
36 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
---|
37 | <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
---|
38 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
---|
39 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
---|
40 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
---|
41 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
---|
42 | </TR>
|
---|
43 | </TABLE>
|
---|
44 | </TD>
|
---|
45 | <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
---|
46 | </EM>
|
---|
47 | </TD>
|
---|
48 | </TR>
|
---|
49 |
|
---|
50 | <TR>
|
---|
51 | <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
---|
52 | <A HREF="../../../../../org/apache/tools/ant/taskdefs/ExecTask.html" title="class in org.apache.tools.ant.taskdefs"><B>PREV CLASS</B></A>
|
---|
53 | <A HREF="../../../../../org/apache/tools/ant/taskdefs/ExecuteJava.html" title="class in org.apache.tools.ant.taskdefs"><B>NEXT CLASS</B></A></FONT></TD>
|
---|
54 | <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
---|
55 | <A HREF="../../../../../index.html" target="_top"><B>FRAMES</B></A>
|
---|
56 | <A HREF="Execute.html" target="_top"><B>NO FRAMES</B></A>
|
---|
57 | <SCRIPT type="text/javascript">
|
---|
58 | <!--
|
---|
59 | if(window==top) {
|
---|
60 | document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
|
---|
61 | }
|
---|
62 | //-->
|
---|
63 | </SCRIPT>
|
---|
64 | <NOSCRIPT>
|
---|
65 | <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
|
---|
66 | </NOSCRIPT>
|
---|
67 |
|
---|
68 | </FONT></TD>
|
---|
69 | </TR>
|
---|
70 | <TR>
|
---|
71 | <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
---|
72 | SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
---|
73 | <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
---|
74 | DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
---|
75 | </TR>
|
---|
76 | </TABLE>
|
---|
77 | <A NAME="skip-navbar_top"></A>
|
---|
78 | <!-- ========= END OF TOP NAVBAR ========= -->
|
---|
79 |
|
---|
80 | <HR>
|
---|
81 | <!-- ======== START OF CLASS DATA ======== -->
|
---|
82 | <H2>
|
---|
83 | <FONT SIZE="-1">
|
---|
84 | org.apache.tools.ant.taskdefs</FONT>
|
---|
85 | <BR>
|
---|
86 | Class Execute</H2>
|
---|
87 | <PRE>
|
---|
88 | java.lang.Object
|
---|
89 | <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by"><B>org.apache.tools.ant.taskdefs.Execute</B>
|
---|
90 | </PRE>
|
---|
91 | <HR>
|
---|
92 | <DL>
|
---|
93 | <DT>public class <B>Execute</B><DT>extends java.lang.Object</DL>
|
---|
94 |
|
---|
95 | <P>
|
---|
96 | Runs an external program.
|
---|
97 | <P>
|
---|
98 |
|
---|
99 | <P>
|
---|
100 | <DL>
|
---|
101 | <DT><B>Since:</B></DT>
|
---|
102 | <DD>Ant 1.2</DD>
|
---|
103 | </DL>
|
---|
104 | <HR>
|
---|
105 |
|
---|
106 | <P>
|
---|
107 | <!-- ======== NESTED CLASS SUMMARY ======== -->
|
---|
108 |
|
---|
109 |
|
---|
110 | <!-- =========== FIELD SUMMARY =========== -->
|
---|
111 |
|
---|
112 | <A NAME="field_summary"><!-- --></A>
|
---|
113 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
---|
114 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
---|
115 | <TD COLSPAN=2><FONT SIZE="+2">
|
---|
116 | <B>Field Summary</B></FONT></TD>
|
---|
117 | </TR>
|
---|
118 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
119 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
120 | <CODE>static int</CODE></FONT></TD>
|
---|
121 | <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/Execute.html#INVALID">INVALID</A></B></CODE>
|
---|
122 |
|
---|
123 | <BR>
|
---|
124 | Invalid exit code.</TD>
|
---|
125 | </TR>
|
---|
126 | </TABLE>
|
---|
127 |
|
---|
128 | <!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
---|
129 |
|
---|
130 | <A NAME="constructor_summary"><!-- --></A>
|
---|
131 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
---|
132 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
---|
133 | <TD COLSPAN=2><FONT SIZE="+2">
|
---|
134 | <B>Constructor Summary</B></FONT></TD>
|
---|
135 | </TR>
|
---|
136 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
137 | <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/Execute.html#Execute()">Execute</A></B>()</CODE>
|
---|
138 |
|
---|
139 | <BR>
|
---|
140 | Creates a new execute object using <code>PumpStreamHandler</code> for
|
---|
141 | stream handling.</TD>
|
---|
142 | </TR>
|
---|
143 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
144 | <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/Execute.html#Execute(org.apache.tools.ant.taskdefs.ExecuteStreamHandler)">Execute</A></B>(<A HREF="../../../../../org/apache/tools/ant/taskdefs/ExecuteStreamHandler.html" title="interface in org.apache.tools.ant.taskdefs">ExecuteStreamHandler</A> streamHandler)</CODE>
|
---|
145 |
|
---|
146 | <BR>
|
---|
147 | Creates a new execute object.</TD>
|
---|
148 | </TR>
|
---|
149 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
150 | <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/Execute.html#Execute(org.apache.tools.ant.taskdefs.ExecuteStreamHandler, org.apache.tools.ant.taskdefs.ExecuteWatchdog)">Execute</A></B>(<A HREF="../../../../../org/apache/tools/ant/taskdefs/ExecuteStreamHandler.html" title="interface in org.apache.tools.ant.taskdefs">ExecuteStreamHandler</A> streamHandler,
|
---|
151 | <A HREF="../../../../../org/apache/tools/ant/taskdefs/ExecuteWatchdog.html" title="class in org.apache.tools.ant.taskdefs">ExecuteWatchdog</A> watchdog)</CODE>
|
---|
152 |
|
---|
153 | <BR>
|
---|
154 | Creates a new execute object.</TD>
|
---|
155 | </TR>
|
---|
156 | </TABLE>
|
---|
157 |
|
---|
158 | <!-- ========== METHOD SUMMARY =========== -->
|
---|
159 |
|
---|
160 | <A NAME="method_summary"><!-- --></A>
|
---|
161 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
---|
162 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
---|
163 | <TD COLSPAN=2><FONT SIZE="+2">
|
---|
164 | <B>Method Summary</B></FONT></TD>
|
---|
165 | </TR>
|
---|
166 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
167 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
168 | <CODE>static void</CODE></FONT></TD>
|
---|
169 | <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/Execute.html#closeStreams(java.lang.Process)">closeStreams</A></B>(java.lang.Process process)</CODE>
|
---|
170 |
|
---|
171 | <BR>
|
---|
172 | Close the streams belonging to the given Process.</TD>
|
---|
173 | </TR>
|
---|
174 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
175 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
176 | <CODE> int</CODE></FONT></TD>
|
---|
177 | <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/Execute.html#execute()">execute</A></B>()</CODE>
|
---|
178 |
|
---|
179 | <BR>
|
---|
180 | Runs a process defined by the command line and returns its exit status.</TD>
|
---|
181 | </TR>
|
---|
182 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
183 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
184 | <CODE> java.lang.String[]</CODE></FONT></TD>
|
---|
185 | <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/Execute.html#getCommandline()">getCommandline</A></B>()</CODE>
|
---|
186 |
|
---|
187 | <BR>
|
---|
188 | Returns the commandline used to create a subprocess.</TD>
|
---|
189 | </TR>
|
---|
190 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
191 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
192 | <CODE> java.lang.String[]</CODE></FONT></TD>
|
---|
193 | <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/Execute.html#getEnvironment()">getEnvironment</A></B>()</CODE>
|
---|
194 |
|
---|
195 | <BR>
|
---|
196 | Returns the environment used to create a subprocess.</TD>
|
---|
197 | </TR>
|
---|
198 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
199 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
200 | <CODE> int</CODE></FONT></TD>
|
---|
201 | <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/Execute.html#getExitValue()">getExitValue</A></B>()</CODE>
|
---|
202 |
|
---|
203 | <BR>
|
---|
204 | Query the exit value of the process.</TD>
|
---|
205 | </TR>
|
---|
206 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
207 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
208 | <CODE>static java.util.Vector</CODE></FONT></TD>
|
---|
209 | <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/Execute.html#getProcEnvironment()">getProcEnvironment</A></B>()</CODE>
|
---|
210 |
|
---|
211 | <BR>
|
---|
212 | Find the list of environment variables for this process.</TD>
|
---|
213 | </TR>
|
---|
214 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
215 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
216 | <CODE>static boolean</CODE></FONT></TD>
|
---|
217 | <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/Execute.html#isFailure(int)">isFailure</A></B>(int exitValue)</CODE>
|
---|
218 |
|
---|
219 | <BR>
|
---|
220 | Checks whether <code>exitValue</code> signals a failure on the current
|
---|
221 | system (OS specific).</TD>
|
---|
222 | </TR>
|
---|
223 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
224 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
225 | <CODE> boolean</CODE></FONT></TD>
|
---|
226 | <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/Execute.html#killedProcess()">killedProcess</A></B>()</CODE>
|
---|
227 |
|
---|
228 | <BR>
|
---|
229 | test for an untimely death of the process</TD>
|
---|
230 | </TR>
|
---|
231 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
232 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
233 | <CODE>static java.lang.Process</CODE></FONT></TD>
|
---|
234 | <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/Execute.html#launch(org.apache.tools.ant.Project, java.lang.String[], java.lang.String[], java.io.File, boolean)">launch</A></B>(<A HREF="../../../../../org/apache/tools/ant/Project.html" title="class in org.apache.tools.ant">Project</A> project,
|
---|
235 | java.lang.String[] command,
|
---|
236 | java.lang.String[] env,
|
---|
237 | java.io.File dir,
|
---|
238 | boolean useVM)</CODE>
|
---|
239 |
|
---|
240 | <BR>
|
---|
241 | Creates a process that runs a command.</TD>
|
---|
242 | </TR>
|
---|
243 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
244 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
245 | <CODE>static void</CODE></FONT></TD>
|
---|
246 | <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/Execute.html#runCommand(org.apache.tools.ant.Task, java.lang.String[])">runCommand</A></B>(<A HREF="../../../../../org/apache/tools/ant/Task.html" title="class in org.apache.tools.ant">Task</A> task,
|
---|
247 | java.lang.String[] cmdline)</CODE>
|
---|
248 |
|
---|
249 | <BR>
|
---|
250 | A utility method that runs an external command.</TD>
|
---|
251 | </TR>
|
---|
252 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
253 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
254 | <CODE> void</CODE></FONT></TD>
|
---|
255 | <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/Execute.html#setAntRun(org.apache.tools.ant.Project)">setAntRun</A></B>(<A HREF="../../../../../org/apache/tools/ant/Project.html" title="class in org.apache.tools.ant">Project</A> project)</CODE>
|
---|
256 |
|
---|
257 | <BR>
|
---|
258 | Set the name of the antRun script using the project's value.</TD>
|
---|
259 | </TR>
|
---|
260 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
261 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
262 | <CODE> void</CODE></FONT></TD>
|
---|
263 | <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/Execute.html#setCommandline(java.lang.String[])">setCommandline</A></B>(java.lang.String[] commandline)</CODE>
|
---|
264 |
|
---|
265 | <BR>
|
---|
266 | Sets the commandline of the subprocess to launch.</TD>
|
---|
267 | </TR>
|
---|
268 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
269 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
270 | <CODE> void</CODE></FONT></TD>
|
---|
271 | <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/Execute.html#setEnvironment(java.lang.String[])">setEnvironment</A></B>(java.lang.String[] env)</CODE>
|
---|
272 |
|
---|
273 | <BR>
|
---|
274 | Sets the environment variables for the subprocess to launch.</TD>
|
---|
275 | </TR>
|
---|
276 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
277 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
278 | <CODE>protected void</CODE></FONT></TD>
|
---|
279 | <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/Execute.html#setExitValue(int)">setExitValue</A></B>(int value)</CODE>
|
---|
280 |
|
---|
281 | <BR>
|
---|
282 | set the exit value</TD>
|
---|
283 | </TR>
|
---|
284 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
285 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
286 | <CODE> void</CODE></FONT></TD>
|
---|
287 | <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/Execute.html#setNewenvironment(boolean)">setNewenvironment</A></B>(boolean newenv)</CODE>
|
---|
288 |
|
---|
289 | <BR>
|
---|
290 | Set whether to propagate the default environment or not.</TD>
|
---|
291 | </TR>
|
---|
292 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
293 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
294 | <CODE> void</CODE></FONT></TD>
|
---|
295 | <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/Execute.html#setSpawn(boolean)">setSpawn</A></B>(boolean spawn)</CODE>
|
---|
296 |
|
---|
297 | <BR>
|
---|
298 | set whether or not you want the process to be spawned
|
---|
299 | default is not spawned</TD>
|
---|
300 | </TR>
|
---|
301 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
302 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
303 | <CODE> void</CODE></FONT></TD>
|
---|
304 | <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/Execute.html#setStreamHandler(org.apache.tools.ant.taskdefs.ExecuteStreamHandler)">setStreamHandler</A></B>(<A HREF="../../../../../org/apache/tools/ant/taskdefs/ExecuteStreamHandler.html" title="interface in org.apache.tools.ant.taskdefs">ExecuteStreamHandler</A> streamHandler)</CODE>
|
---|
305 |
|
---|
306 | <BR>
|
---|
307 | </TD>
|
---|
308 | </TR>
|
---|
309 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
310 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
311 | <CODE> void</CODE></FONT></TD>
|
---|
312 | <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/Execute.html#setVMLauncher(boolean)">setVMLauncher</A></B>(boolean useVMLauncher)</CODE>
|
---|
313 |
|
---|
314 | <BR>
|
---|
315 | Launch this execution through the VM, where possible, rather than through
|
---|
316 | the OS's shell.</TD>
|
---|
317 | </TR>
|
---|
318 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
319 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
320 | <CODE> void</CODE></FONT></TD>
|
---|
321 | <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/Execute.html#setWorkingDirectory(java.io.File)">setWorkingDirectory</A></B>(java.io.File wd)</CODE>
|
---|
322 |
|
---|
323 | <BR>
|
---|
324 | Sets the working directory of the process to execute.</TD>
|
---|
325 | </TR>
|
---|
326 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
327 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
328 | <CODE> void</CODE></FONT></TD>
|
---|
329 | <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/Execute.html#spawn()">spawn</A></B>()</CODE>
|
---|
330 |
|
---|
331 | <BR>
|
---|
332 | Starts a process defined by the command line.</TD>
|
---|
333 | </TR>
|
---|
334 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
335 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
336 | <CODE>static java.lang.String</CODE></FONT></TD>
|
---|
337 | <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/Execute.html#toString(java.io.ByteArrayOutputStream)">toString</A></B>(java.io.ByteArrayOutputStream bos)</CODE>
|
---|
338 |
|
---|
339 | <BR>
|
---|
340 | ByteArrayOutputStream#toString doesn't seem to work reliably on
|
---|
341 | OS/390, at least not the way we use it in the execution
|
---|
342 | context.</TD>
|
---|
343 | </TR>
|
---|
344 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
345 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
346 | <CODE>protected void</CODE></FONT></TD>
|
---|
347 | <TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/Execute.html#waitFor(java.lang.Process)">waitFor</A></B>(java.lang.Process process)</CODE>
|
---|
348 |
|
---|
349 | <BR>
|
---|
350 | wait for a given process</TD>
|
---|
351 | </TR>
|
---|
352 | </TABLE>
|
---|
353 | <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
|
---|
354 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
---|
355 | <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
|
---|
356 | <TD><B>Methods inherited from class java.lang.Object</B></TD>
|
---|
357 | </TR>
|
---|
358 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
359 | <TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
|
---|
360 | </TR>
|
---|
361 | </TABLE>
|
---|
362 |
|
---|
363 | <P>
|
---|
364 |
|
---|
365 | <!-- ============ FIELD DETAIL =========== -->
|
---|
366 |
|
---|
367 | <A NAME="field_detail"><!-- --></A>
|
---|
368 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
---|
369 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
---|
370 | <TD COLSPAN=1><FONT SIZE="+2">
|
---|
371 | <B>Field Detail</B></FONT></TD>
|
---|
372 | </TR>
|
---|
373 | </TABLE>
|
---|
374 |
|
---|
375 | <A NAME="INVALID"><!-- --></A><H3>
|
---|
376 | INVALID</H3>
|
---|
377 | <PRE>
|
---|
378 | public static final int <B>INVALID</B></PRE>
|
---|
379 | <DL>
|
---|
380 | <DD>Invalid exit code.
|
---|
381 | <P>
|
---|
382 | <DL>
|
---|
383 | <DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.tools.ant.taskdefs.Execute.INVALID">Constant Field Values</A></DL>
|
---|
384 | </DL>
|
---|
385 |
|
---|
386 | <!-- ========= CONSTRUCTOR DETAIL ======== -->
|
---|
387 |
|
---|
388 | <A NAME="constructor_detail"><!-- --></A>
|
---|
389 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
---|
390 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
---|
391 | <TD COLSPAN=1><FONT SIZE="+2">
|
---|
392 | <B>Constructor Detail</B></FONT></TD>
|
---|
393 | </TR>
|
---|
394 | </TABLE>
|
---|
395 |
|
---|
396 | <A NAME="Execute()"><!-- --></A><H3>
|
---|
397 | Execute</H3>
|
---|
398 | <PRE>
|
---|
399 | public <B>Execute</B>()</PRE>
|
---|
400 | <DL>
|
---|
401 | <DD>Creates a new execute object using <code>PumpStreamHandler</code> for
|
---|
402 | stream handling.
|
---|
403 | <P>
|
---|
404 | </DL>
|
---|
405 | <HR>
|
---|
406 |
|
---|
407 | <A NAME="Execute(org.apache.tools.ant.taskdefs.ExecuteStreamHandler)"><!-- --></A><H3>
|
---|
408 | Execute</H3>
|
---|
409 | <PRE>
|
---|
410 | public <B>Execute</B>(<A HREF="../../../../../org/apache/tools/ant/taskdefs/ExecuteStreamHandler.html" title="interface in org.apache.tools.ant.taskdefs">ExecuteStreamHandler</A> streamHandler)</PRE>
|
---|
411 | <DL>
|
---|
412 | <DD>Creates a new execute object.
|
---|
413 | <P>
|
---|
414 | <DT><B>Parameters:</B><DD><CODE>streamHandler</CODE> - the stream handler used to handle the input and
|
---|
415 | output streams of the subprocess.</DL>
|
---|
416 | <HR>
|
---|
417 |
|
---|
418 | <A NAME="Execute(org.apache.tools.ant.taskdefs.ExecuteStreamHandler, org.apache.tools.ant.taskdefs.ExecuteWatchdog)"><!-- --></A><H3>
|
---|
419 | Execute</H3>
|
---|
420 | <PRE>
|
---|
421 | public <B>Execute</B>(<A HREF="../../../../../org/apache/tools/ant/taskdefs/ExecuteStreamHandler.html" title="interface in org.apache.tools.ant.taskdefs">ExecuteStreamHandler</A> streamHandler,
|
---|
422 | <A HREF="../../../../../org/apache/tools/ant/taskdefs/ExecuteWatchdog.html" title="class in org.apache.tools.ant.taskdefs">ExecuteWatchdog</A> watchdog)</PRE>
|
---|
423 | <DL>
|
---|
424 | <DD>Creates a new execute object.
|
---|
425 | <P>
|
---|
426 | <DT><B>Parameters:</B><DD><CODE>streamHandler</CODE> - the stream handler used to handle the input and
|
---|
427 | output streams of the subprocess.<DD><CODE>watchdog</CODE> - a watchdog for the subprocess or <code>null</code> to
|
---|
428 | to disable a timeout for the subprocess.</DL>
|
---|
429 |
|
---|
430 | <!-- ============ METHOD DETAIL ========== -->
|
---|
431 |
|
---|
432 | <A NAME="method_detail"><!-- --></A>
|
---|
433 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
---|
434 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
---|
435 | <TD COLSPAN=1><FONT SIZE="+2">
|
---|
436 | <B>Method Detail</B></FONT></TD>
|
---|
437 | </TR>
|
---|
438 | </TABLE>
|
---|
439 |
|
---|
440 | <A NAME="setSpawn(boolean)"><!-- --></A><H3>
|
---|
441 | setSpawn</H3>
|
---|
442 | <PRE>
|
---|
443 | public void <B>setSpawn</B>(boolean spawn)</PRE>
|
---|
444 | <DL>
|
---|
445 | <DD>set whether or not you want the process to be spawned
|
---|
446 | default is not spawned
|
---|
447 | <P>
|
---|
448 | <DD><DL>
|
---|
449 | <DT><B>Parameters:</B><DD><CODE>spawn</CODE> - if true you do not want ant to wait for the end of the process<DT><B>Since:</B></DT>
|
---|
450 | <DD>ant 1.6</DD>
|
---|
451 | </DL>
|
---|
452 | </DD>
|
---|
453 | </DL>
|
---|
454 | <HR>
|
---|
455 |
|
---|
456 | <A NAME="getProcEnvironment()"><!-- --></A><H3>
|
---|
457 | getProcEnvironment</H3>
|
---|
458 | <PRE>
|
---|
459 | public static java.util.Vector <B>getProcEnvironment</B>()</PRE>
|
---|
460 | <DL>
|
---|
461 | <DD>Find the list of environment variables for this process.
|
---|
462 | <P>
|
---|
463 | <DD><DL>
|
---|
464 |
|
---|
465 | <DT><B>Returns:</B><DD>a vector containing the environment variables
|
---|
466 | the vector elements are strings formatted like variable = value</DL>
|
---|
467 | </DD>
|
---|
468 | </DL>
|
---|
469 | <HR>
|
---|
470 |
|
---|
471 | <A NAME="toString(java.io.ByteArrayOutputStream)"><!-- --></A><H3>
|
---|
472 | toString</H3>
|
---|
473 | <PRE>
|
---|
474 | public static java.lang.String <B>toString</B>(java.io.ByteArrayOutputStream bos)</PRE>
|
---|
475 | <DL>
|
---|
476 | <DD>ByteArrayOutputStream#toString doesn't seem to work reliably on
|
---|
477 | OS/390, at least not the way we use it in the execution
|
---|
478 | context.
|
---|
479 | <P>
|
---|
480 | <DD><DL>
|
---|
481 | <DT><B>Parameters:</B><DD><CODE>bos</CODE> - the output stream that one wants to read
|
---|
482 | <DT><B>Returns:</B><DD>the output stream as a string, read with
|
---|
483 | special encodings in the case of z/os and os/400<DT><B>Since:</B></DT>
|
---|
484 | <DD>Ant 1.5</DD>
|
---|
485 | </DL>
|
---|
486 | </DD>
|
---|
487 | </DL>
|
---|
488 | <HR>
|
---|
489 |
|
---|
490 | <A NAME="setStreamHandler(org.apache.tools.ant.taskdefs.ExecuteStreamHandler)"><!-- --></A><H3>
|
---|
491 | setStreamHandler</H3>
|
---|
492 | <PRE>
|
---|
493 | public void <B>setStreamHandler</B>(<A HREF="../../../../../org/apache/tools/ant/taskdefs/ExecuteStreamHandler.html" title="interface in org.apache.tools.ant.taskdefs">ExecuteStreamHandler</A> streamHandler)</PRE>
|
---|
494 | <DL>
|
---|
495 | <DD><DL>
|
---|
496 | <DT><B>Since:</B></DT>
|
---|
497 | <DD>Ant 1.6</DD>
|
---|
498 | </DL>
|
---|
499 | </DD>
|
---|
500 | </DL>
|
---|
501 | <HR>
|
---|
502 |
|
---|
503 | <A NAME="getCommandline()"><!-- --></A><H3>
|
---|
504 | getCommandline</H3>
|
---|
505 | <PRE>
|
---|
506 | public java.lang.String[] <B>getCommandline</B>()</PRE>
|
---|
507 | <DL>
|
---|
508 | <DD>Returns the commandline used to create a subprocess.
|
---|
509 | <P>
|
---|
510 | <DD><DL>
|
---|
511 |
|
---|
512 | <DT><B>Returns:</B><DD>the commandline used to create a subprocess</DL>
|
---|
513 | </DD>
|
---|
514 | </DL>
|
---|
515 | <HR>
|
---|
516 |
|
---|
517 | <A NAME="setCommandline(java.lang.String[])"><!-- --></A><H3>
|
---|
518 | setCommandline</H3>
|
---|
519 | <PRE>
|
---|
520 | public void <B>setCommandline</B>(java.lang.String[] commandline)</PRE>
|
---|
521 | <DL>
|
---|
522 | <DD>Sets the commandline of the subprocess to launch.
|
---|
523 | <P>
|
---|
524 | <DD><DL>
|
---|
525 | <DT><B>Parameters:</B><DD><CODE>commandline</CODE> - the commandline of the subprocess to launch</DL>
|
---|
526 | </DD>
|
---|
527 | </DL>
|
---|
528 | <HR>
|
---|
529 |
|
---|
530 | <A NAME="setNewenvironment(boolean)"><!-- --></A><H3>
|
---|
531 | setNewenvironment</H3>
|
---|
532 | <PRE>
|
---|
533 | public void <B>setNewenvironment</B>(boolean newenv)</PRE>
|
---|
534 | <DL>
|
---|
535 | <DD>Set whether to propagate the default environment or not.
|
---|
536 | <P>
|
---|
537 | <DD><DL>
|
---|
538 | <DT><B>Parameters:</B><DD><CODE>newenv</CODE> - whether to propagate the process environment.</DL>
|
---|
539 | </DD>
|
---|
540 | </DL>
|
---|
541 | <HR>
|
---|
542 |
|
---|
543 | <A NAME="getEnvironment()"><!-- --></A><H3>
|
---|
544 | getEnvironment</H3>
|
---|
545 | <PRE>
|
---|
546 | public java.lang.String[] <B>getEnvironment</B>()</PRE>
|
---|
547 | <DL>
|
---|
548 | <DD>Returns the environment used to create a subprocess.
|
---|
549 | <P>
|
---|
550 | <DD><DL>
|
---|
551 |
|
---|
552 | <DT><B>Returns:</B><DD>the environment used to create a subprocess</DL>
|
---|
553 | </DD>
|
---|
554 | </DL>
|
---|
555 | <HR>
|
---|
556 |
|
---|
557 | <A NAME="setEnvironment(java.lang.String[])"><!-- --></A><H3>
|
---|
558 | setEnvironment</H3>
|
---|
559 | <PRE>
|
---|
560 | public void <B>setEnvironment</B>(java.lang.String[] env)</PRE>
|
---|
561 | <DL>
|
---|
562 | <DD>Sets the environment variables for the subprocess to launch.
|
---|
563 | <P>
|
---|
564 | <DD><DL>
|
---|
565 | <DT><B>Parameters:</B><DD><CODE>env</CODE> - array of Strings, each element of which has
|
---|
566 | an environment variable settings in format <em>key=value</em></DL>
|
---|
567 | </DD>
|
---|
568 | </DL>
|
---|
569 | <HR>
|
---|
570 |
|
---|
571 | <A NAME="setWorkingDirectory(java.io.File)"><!-- --></A><H3>
|
---|
572 | setWorkingDirectory</H3>
|
---|
573 | <PRE>
|
---|
574 | public void <B>setWorkingDirectory</B>(java.io.File wd)</PRE>
|
---|
575 | <DL>
|
---|
576 | <DD>Sets the working directory of the process to execute.
|
---|
577 |
|
---|
578 | <p>This is emulated using the antRun scripts unless the OS is
|
---|
579 | Windows NT in which case a cmd.exe is spawned,
|
---|
580 | or MRJ and setting user.dir works, or JDK 1.3 and there is
|
---|
581 | official support in java.lang.Runtime.
|
---|
582 | <P>
|
---|
583 | <DD><DL>
|
---|
584 | <DT><B>Parameters:</B><DD><CODE>wd</CODE> - the working directory of the process.</DL>
|
---|
585 | </DD>
|
---|
586 | </DL>
|
---|
587 | <HR>
|
---|
588 |
|
---|
589 | <A NAME="setAntRun(org.apache.tools.ant.Project)"><!-- --></A><H3>
|
---|
590 | setAntRun</H3>
|
---|
591 | <PRE>
|
---|
592 | public void <B>setAntRun</B>(<A HREF="../../../../../org/apache/tools/ant/Project.html" title="class in org.apache.tools.ant">Project</A> project)
|
---|
593 | throws <A HREF="../../../../../org/apache/tools/ant/BuildException.html" title="class in org.apache.tools.ant">BuildException</A></PRE>
|
---|
594 | <DL>
|
---|
595 | <DD>Set the name of the antRun script using the project's value.
|
---|
596 | <P>
|
---|
597 | <DD><DL>
|
---|
598 | <DT><B>Parameters:</B><DD><CODE>project</CODE> - the current project.
|
---|
599 | <DT><B>Throws:</B>
|
---|
600 | <DD><CODE><A HREF="../../../../../org/apache/tools/ant/BuildException.html" title="class in org.apache.tools.ant">BuildException</A></CODE> - not clear when it is going to throw an exception, but
|
---|
601 | it is the method's signature</DL>
|
---|
602 | </DD>
|
---|
603 | </DL>
|
---|
604 | <HR>
|
---|
605 |
|
---|
606 | <A NAME="setVMLauncher(boolean)"><!-- --></A><H3>
|
---|
607 | setVMLauncher</H3>
|
---|
608 | <PRE>
|
---|
609 | public void <B>setVMLauncher</B>(boolean useVMLauncher)</PRE>
|
---|
610 | <DL>
|
---|
611 | <DD>Launch this execution through the VM, where possible, rather than through
|
---|
612 | the OS's shell. In some cases and operating systems using the shell will
|
---|
613 | allow the shell to perform additional processing such as associating an
|
---|
614 | executable with a script, etc
|
---|
615 | <P>
|
---|
616 | <DD><DL>
|
---|
617 | <DT><B>Parameters:</B><DD><CODE>useVMLauncher</CODE> - true if exec should launch through the VM,
|
---|
618 | false if the shell should be used to launch the
|
---|
619 | command.</DL>
|
---|
620 | </DD>
|
---|
621 | </DL>
|
---|
622 | <HR>
|
---|
623 |
|
---|
624 | <A NAME="launch(org.apache.tools.ant.Project, java.lang.String[], java.lang.String[], java.io.File, boolean)"><!-- --></A><H3>
|
---|
625 | launch</H3>
|
---|
626 | <PRE>
|
---|
627 | public static java.lang.Process <B>launch</B>(<A HREF="../../../../../org/apache/tools/ant/Project.html" title="class in org.apache.tools.ant">Project</A> project,
|
---|
628 | java.lang.String[] command,
|
---|
629 | java.lang.String[] env,
|
---|
630 | java.io.File dir,
|
---|
631 | boolean useVM)
|
---|
632 | throws java.io.IOException</PRE>
|
---|
633 | <DL>
|
---|
634 | <DD>Creates a process that runs a command.
|
---|
635 | <P>
|
---|
636 | <DD><DL>
|
---|
637 | <DT><B>Parameters:</B><DD><CODE>project</CODE> - the Project, only used for logging purposes, may be null.<DD><CODE>command</CODE> - the command to run<DD><CODE>env</CODE> - the environment for the command<DD><CODE>dir</CODE> - the working directory for the command<DD><CODE>useVM</CODE> - use the built-in exec command for JDK 1.3 if available.
|
---|
638 | <DT><B>Returns:</B><DD>the process started
|
---|
639 | <DT><B>Throws:</B>
|
---|
640 | <DD><CODE>java.io.IOException</CODE> - forwarded from the particular launcher used<DT><B>Since:</B></DT>
|
---|
641 | <DD>Ant 1.5</DD>
|
---|
642 | </DL>
|
---|
643 | </DD>
|
---|
644 | </DL>
|
---|
645 | <HR>
|
---|
646 |
|
---|
647 | <A NAME="execute()"><!-- --></A><H3>
|
---|
648 | execute</H3>
|
---|
649 | <PRE>
|
---|
650 | public int <B>execute</B>()
|
---|
651 | throws java.io.IOException</PRE>
|
---|
652 | <DL>
|
---|
653 | <DD>Runs a process defined by the command line and returns its exit status.
|
---|
654 | <P>
|
---|
655 | <DD><DL>
|
---|
656 |
|
---|
657 | <DT><B>Returns:</B><DD>the exit status of the subprocess or <code>INVALID</code>
|
---|
658 | <DT><B>Throws:</B>
|
---|
659 | <DD><CODE>java.io.IOException</CODE> - The exception is thrown, if launching
|
---|
660 | of the subprocess failed</DL>
|
---|
661 | </DD>
|
---|
662 | </DL>
|
---|
663 | <HR>
|
---|
664 |
|
---|
665 | <A NAME="spawn()"><!-- --></A><H3>
|
---|
666 | spawn</H3>
|
---|
667 | <PRE>
|
---|
668 | public void <B>spawn</B>()
|
---|
669 | throws java.io.IOException</PRE>
|
---|
670 | <DL>
|
---|
671 | <DD>Starts a process defined by the command line.
|
---|
672 | Ant will not wait for this process, nor log its output
|
---|
673 | <P>
|
---|
674 | <DD><DL>
|
---|
675 |
|
---|
676 | <DT><B>Throws:</B>
|
---|
677 | <DD><CODE>java.io.IOException</CODE> - The exception is thrown, if launching
|
---|
678 | of the subprocess failed<DT><B>Since:</B></DT>
|
---|
679 | <DD>ant 1.6</DD>
|
---|
680 | </DL>
|
---|
681 | </DD>
|
---|
682 | </DL>
|
---|
683 | <HR>
|
---|
684 |
|
---|
685 | <A NAME="waitFor(java.lang.Process)"><!-- --></A><H3>
|
---|
686 | waitFor</H3>
|
---|
687 | <PRE>
|
---|
688 | protected void <B>waitFor</B>(java.lang.Process process)</PRE>
|
---|
689 | <DL>
|
---|
690 | <DD>wait for a given process
|
---|
691 | <P>
|
---|
692 | <DD><DL>
|
---|
693 | <DT><B>Parameters:</B><DD><CODE>process</CODE> - the process one wants to wait for</DL>
|
---|
694 | </DD>
|
---|
695 | </DL>
|
---|
696 | <HR>
|
---|
697 |
|
---|
698 | <A NAME="setExitValue(int)"><!-- --></A><H3>
|
---|
699 | setExitValue</H3>
|
---|
700 | <PRE>
|
---|
701 | protected void <B>setExitValue</B>(int value)</PRE>
|
---|
702 | <DL>
|
---|
703 | <DD>set the exit value
|
---|
704 | <P>
|
---|
705 | <DD><DL>
|
---|
706 | <DT><B>Parameters:</B><DD><CODE>value</CODE> - exit value of the process</DL>
|
---|
707 | </DD>
|
---|
708 | </DL>
|
---|
709 | <HR>
|
---|
710 |
|
---|
711 | <A NAME="getExitValue()"><!-- --></A><H3>
|
---|
712 | getExitValue</H3>
|
---|
713 | <PRE>
|
---|
714 | public int <B>getExitValue</B>()</PRE>
|
---|
715 | <DL>
|
---|
716 | <DD>Query the exit value of the process.
|
---|
717 | <P>
|
---|
718 | <DD><DL>
|
---|
719 |
|
---|
720 | <DT><B>Returns:</B><DD>the exit value or Execute.INVALID if no exit value has
|
---|
721 | been received</DL>
|
---|
722 | </DD>
|
---|
723 | </DL>
|
---|
724 | <HR>
|
---|
725 |
|
---|
726 | <A NAME="isFailure(int)"><!-- --></A><H3>
|
---|
727 | isFailure</H3>
|
---|
728 | <PRE>
|
---|
729 | public static boolean <B>isFailure</B>(int exitValue)</PRE>
|
---|
730 | <DL>
|
---|
731 | <DD>Checks whether <code>exitValue</code> signals a failure on the current
|
---|
732 | system (OS specific).
|
---|
733 |
|
---|
734 | <p><b>Note</b> that this method relies on the conventions of
|
---|
735 | the OS, it will return false results if the application you are
|
---|
736 | running doesn't follow these conventions. One notable
|
---|
737 | exception is the Java VM provided by HP for OpenVMS - it will
|
---|
738 | return 0 if successful (like on any other platform), but this
|
---|
739 | signals a failure on OpenVMS. So if you execute a new Java VM
|
---|
740 | on OpenVMS, you cannot trust this method.</p>
|
---|
741 | <P>
|
---|
742 | <DD><DL>
|
---|
743 | <DT><B>Parameters:</B><DD><CODE>exitValue</CODE> - the exit value (return code) to be checked
|
---|
744 | <DT><B>Returns:</B><DD><code>true</code> if <code>exitValue</code> signals a failure</DL>
|
---|
745 | </DD>
|
---|
746 | </DL>
|
---|
747 | <HR>
|
---|
748 |
|
---|
749 | <A NAME="killedProcess()"><!-- --></A><H3>
|
---|
750 | killedProcess</H3>
|
---|
751 | <PRE>
|
---|
752 | public boolean <B>killedProcess</B>()</PRE>
|
---|
753 | <DL>
|
---|
754 | <DD>test for an untimely death of the process
|
---|
755 | <P>
|
---|
756 | <DD><DL>
|
---|
757 |
|
---|
758 | <DT><B>Returns:</B><DD>true if a watchdog had to kill the process<DT><B>Since:</B></DT>
|
---|
759 | <DD>Ant 1.5</DD>
|
---|
760 | </DL>
|
---|
761 | </DD>
|
---|
762 | </DL>
|
---|
763 | <HR>
|
---|
764 |
|
---|
765 | <A NAME="runCommand(org.apache.tools.ant.Task, java.lang.String[])"><!-- --></A><H3>
|
---|
766 | runCommand</H3>
|
---|
767 | <PRE>
|
---|
768 | public static void <B>runCommand</B>(<A HREF="../../../../../org/apache/tools/ant/Task.html" title="class in org.apache.tools.ant">Task</A> task,
|
---|
769 | java.lang.String[] cmdline)
|
---|
770 | throws <A HREF="../../../../../org/apache/tools/ant/BuildException.html" title="class in org.apache.tools.ant">BuildException</A></PRE>
|
---|
771 | <DL>
|
---|
772 | <DD>A utility method that runs an external command. Writes the output and
|
---|
773 | error streams of the command to the project log.
|
---|
774 | <P>
|
---|
775 | <DD><DL>
|
---|
776 | <DT><B>Parameters:</B><DD><CODE>task</CODE> - The task that the command is part of. Used for logging<DD><CODE>cmdline</CODE> - The command to execute.
|
---|
777 | <DT><B>Throws:</B>
|
---|
778 | <DD><CODE><A HREF="../../../../../org/apache/tools/ant/BuildException.html" title="class in org.apache.tools.ant">BuildException</A></CODE> - if the command does not return 0.</DL>
|
---|
779 | </DD>
|
---|
780 | </DL>
|
---|
781 | <HR>
|
---|
782 |
|
---|
783 | <A NAME="closeStreams(java.lang.Process)"><!-- --></A><H3>
|
---|
784 | closeStreams</H3>
|
---|
785 | <PRE>
|
---|
786 | public static void <B>closeStreams</B>(java.lang.Process process)</PRE>
|
---|
787 | <DL>
|
---|
788 | <DD>Close the streams belonging to the given Process.
|
---|
789 | <P>
|
---|
790 | <DD><DL>
|
---|
791 | <DT><B>Parameters:</B><DD><CODE>process</CODE> - the <CODE>Process</CODE>.</DL>
|
---|
792 | </DD>
|
---|
793 | </DL>
|
---|
794 | <!-- ========= END OF CLASS DATA ========= -->
|
---|
795 | <HR>
|
---|
796 |
|
---|
797 |
|
---|
798 | <!-- ======= START OF BOTTOM NAVBAR ====== -->
|
---|
799 | <A NAME="navbar_bottom"><!-- --></A>
|
---|
800 | <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
|
---|
801 | <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
---|
802 | <TR>
|
---|
803 | <TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
---|
804 | <A NAME="navbar_bottom_firstrow"><!-- --></A>
|
---|
805 | <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
---|
806 | <TR ALIGN="center" VALIGN="top">
|
---|
807 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
---|
808 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
---|
809 | <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
---|
810 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
---|
811 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
---|
812 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
---|
813 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
---|
814 | </TR>
|
---|
815 | </TABLE>
|
---|
816 | </TD>
|
---|
817 | <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
---|
818 | </EM>
|
---|
819 | </TD>
|
---|
820 | </TR>
|
---|
821 |
|
---|
822 | <TR>
|
---|
823 | <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
---|
824 | <A HREF="../../../../../org/apache/tools/ant/taskdefs/ExecTask.html" title="class in org.apache.tools.ant.taskdefs"><B>PREV CLASS</B></A>
|
---|
825 | <A HREF="../../../../../org/apache/tools/ant/taskdefs/ExecuteJava.html" title="class in org.apache.tools.ant.taskdefs"><B>NEXT CLASS</B></A></FONT></TD>
|
---|
826 | <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
---|
827 | <A HREF="../../../../../index.html" target="_top"><B>FRAMES</B></A>
|
---|
828 | <A HREF="Execute.html" target="_top"><B>NO FRAMES</B></A>
|
---|
829 | <SCRIPT type="text/javascript">
|
---|
830 | <!--
|
---|
831 | if(window==top) {
|
---|
832 | document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
|
---|
833 | }
|
---|
834 | //-->
|
---|
835 | </SCRIPT>
|
---|
836 | <NOSCRIPT>
|
---|
837 | <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
|
---|
838 | </NOSCRIPT>
|
---|
839 |
|
---|
840 | </FONT></TD>
|
---|
841 | </TR>
|
---|
842 | <TR>
|
---|
843 | <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
---|
844 | SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
---|
845 | <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
---|
846 | DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
---|
847 | </TR>
|
---|
848 | </TABLE>
|
---|
849 | <A NAME="skip-navbar_bottom"></A>
|
---|
850 | <!-- ======== END OF BOTTOM NAVBAR ======= -->
|
---|
851 |
|
---|
852 | <HR>
|
---|
853 | Copyright © 2000-2007 Apache Software Foundation. All Rights Reserved.
|
---|
854 | </BODY>
|
---|
855 | </HTML>
|
---|