public static String compileAlgorythm(String commandLine){
        BufferedReader bufDone;
        BufferedReader bufError;
        String stringDone = "";
        String stringError = "";
        try{

            Process compile = Runtime.getRuntime().exec(commandLine);
            bufDone = new BufferedReader(new InputStreamReader(compile.getInputStream()));
            bufError = new BufferedReader(new InputStreamReader(compile.getErrorStream()));

            String lineDone;
            while ((lineDone = bufDone.readLine())!=null)
                stringDone = stringDone + lineDone + "\n";
            bufDone.close();

            String lineError;
            while ((lineError = bufError.readLine())!=null)
                stringError = stringError +lineError + "\n";
            bufError.close();

        }catch(IOException ex){
            JOptionPane.showMessageDialog(frames.getFrameCreateAlgo(),
                    ex.getMessage() , "Compile error", JOptionPane.ERROR_MESSAGE);
            return null;

        }catch(IllegalArgumentException ex){
            JOptionPane.showMessageDialog(frames.getFrameCreateAlgo(),
                    ex.getMessage() , "Compile error", JOptionPane.ERROR_MESSAGE);
            return null;
        }

        if (!stringError.equals(""))
            return stringError;
        return "Done";

    }