diff --git a/src/main/java/it/polimi/ingsw/gc14/ClientLauncherTUI.java b/src/main/java/it/polimi/ingsw/gc14/ClientLauncherTUI.java index 928973a..78296bd 100644 --- a/src/main/java/it/polimi/ingsw/gc14/ClientLauncherTUI.java +++ b/src/main/java/it/polimi/ingsw/gc14/ClientLauncherTUI.java @@ -63,7 +63,7 @@ public class ClientLauncherTUI { int networkType = scanner.nextInt(); System.out.println("Insert server IP: "); String IP = scanner.next(); - System.setProperty("java.rmi.server.hostname", IP); + // RMI if (networkType == 0) { // Connect @@ -73,6 +73,7 @@ public class ClientLauncherTUI { } catch (Exception e) { throw new RuntimeException(e); } + System.setProperty("java.rmi.server.hostname", myIP); RMIClient client = new RMIClient(controller, IP, 1099, myIP); if (client.connect(username, proposedNumPlayers)) { System.out.println("Succesfully connected to RMI server\n\n");