@@ -0,0 +1,1191 @@
+import java.io.File;%0D%0Aimport java.io.IOException;%0D%0Aimport java.io.OutputStream;%0D%0A%0D%0Apublic class Start %7B%0D%0A    private static Process process;%0D%0A    private static OutputStream output;%0D%0A%0D%0A    public static void main(String args%5B%5D) %7B%0D%0A        if (args.length != 2) %7B%0D%0A            System.out.println(%22Two Arguments needed, first command, second path%22);%0D%0A            return;%0D%0A        %7D%0D%0A%0D%0A        Runtime.getRuntime().addShutdownHook(new Thread() %7B%0D%0A            @Override%0D%0A            public void run() %7B%0D%0A                try %7B%0D%0A                    output.write(%22stop%22.getBytes());%0D%0A                %7D catch (IOException ex) %7B%0D%0A                    System.out.println(%22Stop Failed: %22 + ex.getMessage());%0D%0A                %7D%0D%0A            %7D%0D%0A        %7D);%0D%0A%0D%0A        try %7B%0D%0A            process = Runtime.getRuntime().exec(args%5B0%5D, null, new File(args%5B1%5D));%0D%0A            output = process.getOutputStream();%0D%0A        %7D catch (Exception ex) %7B%0D%0A            System.out.println(%22Start Failed: %22 + ex.getMessage());%0D%0A        %7D%0D%0A%0D%0A        try %7B%0D%0A            process.waitFor();%0D%0A        %7D catch (InterruptedException ex) %7B%0D%0A            System.out.println(%22Wait Failed: %22 + ex.getMessage());%0D%0A        %7D%0D%0A    %7D%0D%0A%7D%0D%0A

Add Start Program