ResourceInitializer { public static void initialize(String contextPath, File warRoot, ClassLoader... classloaders) { String refinedContextPath = Servlets.forContext().getContextPath(contextPath); IResourceRuntimeConfig config = initWarConfig(refinedContextPath, warRoot); IResourceRegistry registry = config.getRegistry(); ClassLoader[] configurationClassLoaders = getConfigurationClassLoaders(classloaders); List<IResourceConfigurator> configurators = getAllConfigurators(configurationClassLoaders); initializeWithConfigurators(configurators, registry, refinedContextPath); VersionID versionId = registry.getLibraryVersionProvider().resolveWeb(warRoot); if (versionId != null) { config.setAppId(versionId.getId()); config.setAppVersion(versionId.getVersion()); } loadResourceMimeTypes(registry, configurationClassLoaders); ClassLoader appClassLoader = Thread.currentThread().getContextClassLoader(); if (appClassLoader == null) { appClassLoader = ResourceInitializer.class.getClassLoader(); } config.setAppClassLoader(appClassLoader); } private  ResourceInitializer(); static void initialize(String contextPath, File warRoot, ClassLoader... classloaders); static void initializeResourceBundles(IResourceRuntimeConfig config, ClassLoader... classloaders);  }
@Test public void testInitializeWithoutClassLoader() { ResourceInitializer.initialize("/ResourceBundleTest", new File("warRoot"), null); }