diff --git a/src/main/java/musicplayer/ConfigManager.java b/src/main/java/musicplayer/ConfigManager.java index bfdfe33..6d29cd2 100644 --- a/src/main/java/musicplayer/ConfigManager.java +++ b/src/main/java/musicplayer/ConfigManager.java @@ -60,7 +60,13 @@ public final class ConfigManager { } } catch (IOException ignored) { } - return "jdbc:hsqldb:mem:."; // If not set use an in-memory database for now. + librarySettings.setProperty(databaseKey, "musicDB"); + try(FileWriter fileWriter = new FileWriter(settingsFilename)){ + librarySettings.store(fileWriter, ""); + } catch (IOException e) { + e.printStackTrace(); + } + return "jdbc:hsqldb:file:" + new File("musicDB").getAbsolutePath() + ";shutdown=true"; //Use relative file by default } /**