Skip to content
Snippets Groups Projects
Commit 20cbbeaf authored by Robert Goldmann's avatar Robert Goldmann
Browse files

Fixed #78

parent 5e206cb0
No related branches found
No related tags found
1 merge request!104merge v_1_2_0 into master
......@@ -4,6 +4,7 @@ import java.io.File;
import java.io.IOException;
import java.net.URISyntaxException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Locale;
import java.util.ResourceBundle;
......@@ -30,11 +31,15 @@ public class Main
Logger.error(e1);
}
if(!Files.exists(Paths.get("settings.json")))
try
{
Path settingsPath = Paths.get(Settings.class.getProtectionDomain().getCodeSource().getLocation().toURI()).resolve("settings.json");
if(!Files.exists(settingsPath))
{
try
{
Files.copy(SparkServer.class.getClassLoader().getResourceAsStream("de/deadlocker8/budgetmasterserver/resources/settings.json"), Paths.get("settings.json"));
Files.copy(SparkServer.class.getClassLoader().getResourceAsStream("de/deadlocker8/budgetmasterserver/resources/settings.json"), settingsPath);
}
catch(IOException e)
{
......@@ -53,4 +58,10 @@ public class Main
Logger.error(e);
}
}
catch(URISyntaxException e1)
{
Logger.error(e1);
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment