private static void ExecuteCommand(String CommandText, File WorkingDirectory) {
        final Process p;     // Process tracks one external native process

        BufferedReader pis;  // reader for output of process


        String pline = "";
        try {
            p = Runtime.getRuntime().exec(CommandText, null, WorkingDirectory);

            // Optional: start a thread to wait for the process to terminate.
            // Don't just wait in main line, but here set a "done" flag and
            // use that to control the main reading loop below.
            Thread waiter = new Thread() {

                public void run() {
                    try {
                        p.waitFor();
                    } catch (InterruptedException ex) {
                        // OK, just quit.
                        return;
                    }
//                    System.out.println("Program terminated!");
                    ResultList.add("Program terminated!");
                    done = true;
                }
            };
            waiter.start();

            // getInputStream gives an Input stream connected to
            // the process p's standard output (and vice versa). We use
            // that to construct a BufferedReader so we can readLine() it.
            pis = new BufferedReader(new InputStreamReader(p.getInputStream()));

            while (!done && ((pline = pis.readLine()) != null)) {
//                System.out.println(pline);
                ResultList.add(pline);
            }

        } catch (IOException e) {

            System.err.println("Error1!");
        } catch (Exception err) {

            System.err.println("Error2!");
            err.printStackTrace();
        }
    }