/** * Load a {@link ServiceRegistrarFactory} from a plugin jar file with a parent class loader that * will not load classes from the jvm classpath. Any dependencies of the plugin must be included * in the plugin jar. * * @param plugin The plugin jar file to load. * * @return A {@link ServiceRegistrarFactory}, null if none could be found. * * @throws ServiceRegistrarLoadingException if loading failed. */ public static ServiceRegistrarFactory load(final Path plugin) throws ServiceRegistrarLoadingException { return load(plugin, CURRENT, extensionClassLoader(CURRENT)); }
/** * Load a {@link ServiceRegistrarFactory} from a plugin jar file with a parent class loader that * will not load classes from the jvm classpath. Any dependencies of the plugin must be included * in the plugin jar. * * @param plugin The plugin jar file to load. * @return A {@link ServiceRegistrarFactory}, null if none could be found. * @throws ServiceRegistrarLoadingException if loading failed. */ public static ServiceRegistrarFactory load(final Path plugin) throws ServiceRegistrarLoadingException { return load(plugin, CURRENT, extensionClassLoader(CURRENT)); }