(String[] args)
| 45 | private static final Logger LOG = Logger.getLogger(Bootstrap.class.getName()); |
| 46 | |
| 47 | public static void main(String[] args) { |
| 48 | ClassLoader classLoader = Bootstrap.class.getClassLoader(); |
| 49 | |
| 50 | if (args.length == 0) { |
| 51 | runMain(classLoader, args); |
| 52 | return; |
| 53 | } |
| 54 | |
| 55 | if ("--ext".equals(args[0])) { |
| 56 | if (args.length < 2) { |
| 57 | runMain(classLoader, args); |
| 58 | return; |
| 59 | } |
| 60 | |
| 61 | ClassLoader parent = createExtendedClassLoader(args[1]); |
| 62 | |
| 63 | String[] remainingArgs = new String[args.length - 2]; |
| 64 | System.arraycopy(args, 2, remainingArgs, 0, args.length - 2); |
| 65 | args = remainingArgs; |
| 66 | |
| 67 | classLoader = new PossessiveClassLoader(parent); |
| 68 | |
| 69 | // Ensure that we use our freshly minted classloader by default. |
| 70 | Thread.currentThread().setContextClassLoader(classLoader); |
| 71 | } |
| 72 | |
| 73 | runMain(classLoader, args); |
| 74 | } |
| 75 | |
| 76 | private static void runMain(ClassLoader loader, String[] args) { |
| 77 | try { |
nothing calls this directly
no test coverage detected