Package org.jvnet.winp

Examples of org.jvnet.winp.WinProcess.killRecursively()


        // workaround for Windows issue when stopping a process. Use
        // an external library that does a better job stopping
        // processes than Process.destroy()
        if (System.getProperty("os.name").startsWith("Windows")) {
            WinProcess wp = new WinProcess(proc);
            wp.killRecursively();
        } else {
            proc.destroy();
        }
    }
View Full Code Here


* @author Kohsuke Kawaguchi
*/
public class Main {
    public static void main(String[] args) {
        WinProcess p = new WinProcess(Integer.parseInt(args[0]));
        p.killRecursively();
        // p.setPriority(Priority.BELOW_NORMAL);
    }
}
View Full Code Here

        System.out.println(wp.getEnvironmentVariables());
        assertEquals("foobar", wp.getEnvironmentVariables().get("TEST"));

        Thread.sleep(100);
        wp.killRecursively();
    }

    @BeforeClass
    public static void enableDebug() {
        WinProcess.enableDebugPrivilege();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.