Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private static boolean kill(String input) {
- String cmd = "wmic Path win32_process Where \"CommandLine Like '%" + input + "%'\" Call Terminate";
- Runtime run = Runtime.getRuntime();
- try {
- run.exec(cmd);
- return true;
- } catch (IOException e1) {
- e1.printStackTrace();
- }
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement