@Override
    public int run(InputStream in, OutputStream out, OutputStream err, String... arguments) {
        for (String a : arguments) {
            if (a.equals("-classpath")) {
                return compiler.run(in, out, err, arguments);
            }
        }

        // no classpath given
        List<String> args = new ArrayList<String>(arguments.length + 2);
        args.add("-classpath");
        args.add(getClasspath());
        for (String arg : arguments) {
            args.add(arg);
        }
        return compiler.run(in, out, err, args.toArray(new String[args.size()]));
    }
SimpleCompiler provides a convenience wrapper of the JavaCompiler interface
with automatic classpath generation

@author tiwe
querydsl-codegen-utils/src/main/java/com/querydsl/codegen/utils/SimpleCompiler.java