cmd.add("-O2");
cmd.add("-C");
for(File f : listFiles(tmpDir)) cmd.add(f.toString());
CommandExecutor commandExecutor = new CommandExecutor(cmd.toArray(new String[0]), tmpDir);
commandExecutor.execute();
if(commandExecutor.getOutput().length > 0 || commandExecutor.getError().length > 0)
{
StringBuffer sb = new StringBuffer("Compiling java source files failed:\n");
for(String s : commandExecutor.getOutput()) { sb.append(" [stdout] "); sb.append(s); sb.append("\n"); }
for(String s : commandExecutor.getError()) { sb.append(" [stderr] "); sb.append(s); sb.append("\n"); }