Here you can find the source of killProcessNix(String pid)
public static boolean killProcessNix(String pid) throws InterruptedException, IOException
//package com.java2s; //License from project: Apache License import java.io.IOException; public class Main { public static boolean killProcessNix(String pid) throws InterruptedException, IOException { Runtime.getRuntime().exec("kill " + pid).waitFor(); return true; }/*from www .ja v a 2s . co m*/ }