public static boolean closeLinuxProcess(String Pid) {
boolean b=false;
Process process = null;
BufferedReader reader = null;
try {
//杀掉进程
process = Runtime.getRuntime().exec("kill -9 " + Pid);
reader = new BufferedReader(new InputStreamReader(process.getInputStream()));
String line = null;
while ((line = reader.readLine()) != null) {
System.out.println("kill PID return info -----> " + line);
}
b=true;
} catch (Exception e) {
e.printStackTrace();
} finally {
if (process != null) {
process.destroy();
}
if (reader != null) {
try {
reader.close();
} catch (IOException e) {
}
}
}
return b;
}