    @Test public void testDynamicArgs() {

        javax.tools.JavaCompiler compiler = javax.tools.ToolProvider.getSystemJavaCompiler();
        List<String> args = Arrays.asList("-help");
        try {
            javax.tools.JavaCompiler.CompilationTask compilationTask =
                    compiler.getTask(null, null, null, args, null, null);
            compilationTask.call();
        } catch (IllegalArgumentException e) {
            System.out.println("必然会抛IllegalArgumentException异常");
        }
    }