if (main == null) {
throw new Exception("main class (extending PluginMain) not found!");
}
// load the plugins dependencies
PluginMain m = (PluginMain) loadClass(main).newInstance();
for (String depPath : m.getDependencies(configPath)) {
Logging.logMessage(Logging.LEVEL_INFO, this, "Loading plugin dependency %s.",
depPath);
loadJar(depPath);
}
// start the plugin
babuDB = m.execute(babuDB, configPath);
} catch (Exception e) {
if (e.getMessage() == null) Logging.logError(Logging.LEVEL_WARN, this, e);
throw new IOException("Plugin at '" + pluginPath + "' for version " + BABUDB_VERSION
+ ((configPath != null) ? " with config at path " + configPath : "")