private ClassLoader getClassLoader() {
        if (bundleLocations.isEmpty()) {
            return getClass().getClassLoader();
        } else {
            if (classLoader == null) {
                classLoader = new URLClassLoader(bundleLocations.toArray(new URL[0]), getClass().getClassLoader());
            }
            return classLoader;
        }
    }
A (mock) OSGI implementation which loads classes from the system classpath

@author Tony Vaagenes
@author ollivir
standalone-container/src/main/java/com/yahoo/application/container/impl/ClassLoaderOsgiFramework.java