String command = String.format(“fuser -k -n tcp %d”, port);
Runtime runtime = Runtime.getRuntime();
Process p = runtime.exec(command);

String command = String.format(“fuser -k -n tcp %d”, port);
Runtime runtime = Runtime.getRuntime();
Process p = runtime.exec(command);