diff --git a/src/META-INF/MANIFEST.MF b/src/META-INF/MANIFEST.MF
index f0d972d..091c70a 100644
--- a/src/META-INF/MANIFEST.MF
+++ b/src/META-INF/MANIFEST.MF
@@ -1,6 +1,3 @@
Manifest-Version: 1.0
Main-Class: ovh.alexisdelhaie.endpoint.Main
-Class-Path: src.zip javafx-swt.jar javafx.web.jar javafx.base.jar javafx
- .fxml.jar javafx.media.jar javafx.swing.jar javafx.controls.jar javafx.
- graphics.jar
diff --git a/src/ovh/alexisdelhaie/endpoint/Main.java b/src/ovh/alexisdelhaie/endpoint/Main.java
index cc8634a..00cd5e6 100644
--- a/src/ovh/alexisdelhaie/endpoint/Main.java
+++ b/src/ovh/alexisdelhaie/endpoint/Main.java
@@ -6,6 +6,7 @@ import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.image.Image;
import javafx.stage.Stage;
+import ovh.alexisdelhaie.endpoint.controllers.Controller;
public class Main extends Application {
diff --git a/src/ovh/alexisdelhaie/endpoint/configuration.fxml b/src/ovh/alexisdelhaie/endpoint/configuration.fxml
deleted file mode 100644
index 1065c18..0000000
--- a/src/ovh/alexisdelhaie/endpoint/configuration.fxml
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/ovh/alexisdelhaie/endpoint/configuration/ConfigurationProperties.java b/src/ovh/alexisdelhaie/endpoint/configuration/ConfigurationProperties.java
new file mode 100644
index 0000000..a2a5b21
--- /dev/null
+++ b/src/ovh/alexisdelhaie/endpoint/configuration/ConfigurationProperties.java
@@ -0,0 +1,127 @@
+package ovh.alexisdelhaie.endpoint.configuration;
+
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import javafx.scene.control.Alert;
+
+import java.io.File;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.HashMap;
+import java.util.Map;
+
+public class ConfigurationProperties {
+
+ private Map properties;
+ private String osname;
+ private String filepath;
+ private ObjectMapper mapper;
+
+ @SuppressWarnings("unchecked")
+ public ConfigurationProperties() {
+ osname = System.getProperty("os.name").toUpperCase();
+ properties = new HashMap<>();
+ mapper = new ObjectMapper();
+ filepath = new StringBuilder(getAppData())
+ .append("EndPoint")
+ .append(getSeparator())
+ .append("settings.json")
+ .toString();
+ createAppFolder();
+ load();
+ }
+
+ public void setProperty(String key, String value) {
+ properties.put(key, value);
+ save();
+ }
+
+ public String getStringProperty(String key, String defaultS) {
+ if (properties.containsKey(key)) {
+ return properties.get(key);
+ }
+ return defaultS;
+ }
+
+ public boolean getBooleanProperty(String key, boolean defaultB) {
+ if (properties.containsKey(key)) {
+ return Boolean.parseBoolean(properties.get(key));
+ }
+ return defaultB;
+ }
+
+ private void save() {
+ try {
+ mapper.writeValue(new File(filepath), properties);
+ } catch (Exception e) {
+ Alert alert = new Alert(Alert.AlertType.ERROR);
+ alert.setTitle("Cannot save settings");
+ alert.setHeaderText("There was an error while saving settings file");
+ alert.setContentText(e.getMessage());
+ alert.showAndWait();
+ }
+ }
+
+ private void load() {
+ File f = new File(filepath);
+ try {
+ if (f.exists()) {
+ properties = mapper.readValue(f, new TypeReference