diff --git a/src/Server.java b/src/Server.java index 7b7bbcb..07441b6 100644 --- a/src/Server.java +++ b/src/Server.java @@ -28,11 +28,11 @@ public Server(int port) { // string to read input String line = ""; while (!line.equalsIgnoreCase("exit")) { + try { // read the message sent by the client via socket line = input.readUTF(); System.out.println(line); // try to execute the command on cmd using Runtime.getRuntime - try { Process cmd_process = Runtime.getRuntime().exec(new String[]{"cmd", "/c " + line}); Process linux_process = Runtime.getRuntime().exec(new String[]{line}); } catch (IOException IOe) {