Make main method accessible to Bootstrap

This commit is contained in:
jglrxavpok 2020-09-23 22:21:18 +02:00
parent 6ffc9c2eef
commit 3073f2f52f

View File

@ -33,6 +33,7 @@ public final class Bootstrap {
Class<?> mainClass = classLoader.loadClass(mainClassFullName);
Method main = mainClass.getDeclaredMethod("main", String[].class);
main.setAccessible(true);
main.invoke(null, new Object[] { args });
} catch (InvocationTargetException | NoSuchMethodException | IllegalAccessException | ClassNotFoundException e) {
e.printStackTrace();