+
+ /* create a configuration. */
+ Configuration configuration;
+ try {
+ configuration = new Configuration(new PluginStoreConfigurationBackend(pluginRespirator.getStore()));
+ } catch (DatabaseDisabledException dde1) {
+ logger.log(Level.WARNING, "Could not load plugin store, using XML files.");
+ try {
+ configuration = new Configuration(new XMLConfigurationBackend(new File("sone.xml"), true));
+ } catch (ConfigurationException ce1) {
+ logger.log(Level.SEVERE, "Could not load or create the “sone.xml” configuration file!");
+ configuration = new Configuration(new MapConfigurationBackend(Collections.<String, String> emptyMap()));
+ }
+ }
+
+ /* create freenet interface. */
+ FreenetInterface freenetInterface = new FreenetInterface(pluginRespirator.getNode());
+
+ /* create core. */
+ core = new Core();
+ core.configuration(configuration);
+ core.freenetInterface(freenetInterface);
+
+ /* start core! */
+ core.start();