static void |
killProcess(long pid)
Kill a process launched by executeCommandLine methods
Doesn't work correctly on windows, only the cmd process will be destroy but not the sub process (
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CommandLineUtils
public CommandLineUtils()
executeCommandLine
public static int executeCommandLine(Commandline cl,
StreamConsumer systemOut,
StreamConsumer systemErr)
throws CommandLineException
- Throws:
CommandLineException
executeCommandLine
public static int executeCommandLine(Commandline cl,
java.io.InputStream systemIn,
StreamConsumer systemOut,
StreamConsumer systemErr)
throws CommandLineException
- Throws:
CommandLineException
getSystemEnvVars
public static java.util.Properties getSystemEnvVars()
throws java.io.IOException
- Throws:
java.io.IOException
getSystemEnvVars
public static java.util.Properties getSystemEnvVars(boolean caseSensitive)
throws java.io.IOException
- Return the shell environment variables. If
caseSensitive == true , then envar
keys will all be upper-case.
- Parameters:
caseSensitive - Whether environment variable keys should be treated case-sensitively.
- Returns:
- Properties object of (possibly modified) envar keys mapped to their values.
- Throws:
java.io.IOException
killProcess
public static void killProcess(long pid)
- Kill a process launched by executeCommandLine methods
Doesn't work correctly on windows, only the cmd process will be destroy but not the sub process (Bug ID 4770092)
- Parameters:
pid - The pid of command return by Commandline.getPid()
isAlive
public static boolean isAlive(long pid)
Copyright © 2001-2006 Codehaus. All Rights Reserved.
|