|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.tools.ant.taskdefs.launcher.CommandLauncher
public class CommandLauncher
A command launcher for a particular JVM/OS platform. This class is a general purpose command launcher which can only launch commands in the current working directory.
| Field Summary | |
|---|---|
protected static FileUtils |
FILE_UTILS
|
| Constructor Summary | |
|---|---|
CommandLauncher()
|
|
| Method Summary | |
|---|---|
java.lang.Process |
exec(Project project,
java.lang.String[] cmd,
java.lang.String[] env)
Launches the given command in a new process. |
java.lang.Process |
exec(Project project,
java.lang.String[] cmd,
java.lang.String[] env,
java.io.File workingDir)
Launches the given command in a new process, in the given working directory. |
static CommandLauncher |
getShellLauncher(Project project)
Obtains the shell launcher configured for the given project or the default shell launcher. |
static CommandLauncher |
getVMLauncher(Project project)
Obtains the VM launcher configured for the given project or the default VM launcher. |
static void |
setShellLauncher(Project project,
CommandLauncher launcher)
Sets the shell launcher to use for the given project. |
static void |
setVMLauncher(Project project,
CommandLauncher launcher)
Sets the VM launcher to use for the given project. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final FileUtils FILE_UTILS
| Constructor Detail |
|---|
public CommandLauncher()
| Method Detail |
|---|
public java.lang.Process exec(Project project,
java.lang.String[] cmd,
java.lang.String[] env)
throws java.io.IOException
project - The project that the command is part of.cmd - The command to execute.env - The environment for the new process. If null, the
environment of the current process is used.
java.io.IOException - if attempting to run a command in a specific directory.
public java.lang.Process exec(Project project,
java.lang.String[] cmd,
java.lang.String[] env,
java.io.File workingDir)
throws java.io.IOException
project - The project that the command is part of.cmd - The command to execute.env - The environment for the new process. If null, the
environment of the current process is used.workingDir - The directory to start the command in. If null, the
current directory is used.
java.io.IOException - if trying to change directory.public static CommandLauncher getShellLauncher(Project project)
public static CommandLauncher getVMLauncher(Project project)
public static void setVMLauncher(Project project,
CommandLauncher launcher)
public static void setShellLauncher(Project project,
CommandLauncher launcher)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||