Run main method @param className the main class name @param options compiler options @param src the source code @param args arguments for main method
(String className, Iterable<String> options, String src, String... args)
| 121 | * @param args arguments for main method |
| 122 | */ |
| 123 | public void run(String className, Iterable<String> options, String src, String... args) throws Throwable { |
| 124 | Class<?> c = compile(className, options, src); |
| 125 | Method mainMethod = c.getMethod(MAIN_METHOD_NAME, String[].class); |
| 126 | mainMethod.invoke(null, (Object) args); |
| 127 | } |
| 128 | |
| 129 | /** |
| 130 | * Run main method |