diff --git a/config/system.properties b/config/system.properties index 6c71b43..b7b93d2 100644 --- a/config/system.properties +++ b/config/system.properties @@ -1,12 +1,15 @@ #### Chat System wide properties # keystore=config/keystore/strike_keystore.jks + #### ## Chat Client specific # -client.string=string -client.integer=1 -client.boolean=true +#client.seed.server = 115.146.90.37 +#client.seed.server.port = 4440 +client.seed.server = localhost +client.seed.server.port = 4444 + #### ## Chat Server specific # diff --git a/strike-client/src/main/java/strike/controller/Login.java b/strike-client/src/main/java/strike/controller/Login.java index 8698957..b9ee95e 100644 --- a/strike-client/src/main/java/strike/controller/Login.java +++ b/strike-client/src/main/java/strike/controller/Login.java @@ -7,14 +7,13 @@ import javafx.fxml.FXMLLoader; import javafx.scene.Scene; import javafx.scene.control.*; +import javafx.scene.layout.Pane; import org.apache.commons.configuration2.Configuration; import org.apache.commons.configuration2.builder.fluent.Configurations; import org.apache.commons.configuration2.ex.ConfigurationException; import org.apache.logging.log4j.Level; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import javafx.scene.layout.Pane; - import org.json.simple.JSONArray; import org.json.simple.JSONObject; import org.json.simple.parser.JSONParser; @@ -97,10 +96,13 @@ private void initialize() { // Try to create the SSL socket we are going to use for all communication. sslsocketfactory = (SSLSocketFactory) SSLSocketFactory.getDefault(); + String localhost = systemProperties.getString("client.seed.server"); + int port = systemProperties.getInt("client.seed.server.port"); + try { // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! // This server needs to be running or else we cannot get the server list! - socket = (SSLSocket) sslsocketfactory.createSocket("115.146.90.37", 4440); + socket = (SSLSocket) sslsocketfactory.createSocket(localhost, port); // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! // To run locally, use this socket instead!