private static void runApplication(OsgiFramework osgi, List<Module> modules) throws Exception {
        ApplicationLoader loader = new ApplicationLoader(osgi, modules);
        loader.init(null, false);
        try {
            loader.start();
            ((ClientApplication)loader.application()).run();
            loader.stop();
        } finally {
            loader.destroy();
        }
    }
<p>Creates and runs an instance of the the given {@link ClientApplication} class with OSGi support.</p>

@param cachePath    The path to use for the OSGi bundle cache.
@param appClass     The ClientApplication class to inject.
@param guiceModules The Guice {@link Module Modules} to install prior to startup.
@throws Exception If an exception was thrown by the ClientApplication.
jdisc_core/src/main/java/com/yahoo/jdisc/client/ClientDriver.java