package net.pterodactylus.jsite.main;
+import java.io.File;
+
+import net.pterodactylus.jsite.core.Core;
+import net.pterodactylus.jsite.core.ProjectManager;
+import net.pterodactylus.jsite.gui.SwingInterface;
+
/**
* Main class that is called by the VM.
*
* The command-line arguments
*/
public static void main(String[] args) {
+ new Main().start();
+ }
+
+ /**
+ * Starts the core and the default {@link SwingInterface}.
+ */
+ private void start() {
+ Core core = new Core();
+
+ String configDirectory = System.getProperty("user.home") + File.separator + ".jSite";
+
+ ProjectManager projectManager = new ProjectManager(configDirectory);
+ core.setProjectManager(projectManager);
+
+ SwingInterface swingInterface = new SwingInterface(core, configDirectory);
+ core.addCoreListener(swingInterface);
+ swingInterface.start();
+
+ core.start();
}
}